<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Span Observer</title>
    <description>The latest articles on DEV Community by Span Observer (@spanobserver).</description>
    <link>https://dev.to/spanobserver</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4230759%2Fec482140-e2ca-44fb-b097-403595d07ccf.png</url>
      <title>DEV Community: Span Observer</title>
      <link>https://dev.to/spanobserver</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/spanobserver"/>
    <language>en</language>
    <item>
      <title>OpenTelemetry Java agent for Dynatrace: instrument an application and send its data</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 21:30:23 +0000</pubDate>
      <link>https://dev.to/spanobserver/opentelemetry-java-agent-for-dynatrace-instrument-an-application-and-send-its-data-3b8a</link>
      <guid>https://dev.to/spanobserver/opentelemetry-java-agent-for-dynatrace-instrument-an-application-and-send-its-data-3b8a</guid>
      <description>&lt;p&gt;Your team wants standard, portable instrumentation for a Spring Boot application without changing its code. It has no OneAgent on these containers, or it has chosen OpenTelemetry as the platform standard. The OpenTelemetry Java agent for Dynatrace meets that need: one JAR file added at JVM startup, and traces, metrics and logs flow over OTLP to Dynatrace.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: download the agent, configure it with environment variables to send all three signals to Dynatrace, deploy it on a VM and then on Kubernetes, and check that the data arrives. The content applies to both &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; and &lt;strong&gt;Dynatrace Managed&lt;/strong&gt;; only the endpoint URL changes.&lt;/p&gt;

&lt;p&gt;If OneAgent already monitors the same process, first read &lt;a href="https://span.observer/en/oneagent-opentelemetry-duplicate-spans/" rel="noopener noreferrer"&gt;OneAgent and OpenTelemetry: avoiding duplicate spans&lt;/a&gt;. Two auto-instrumentations in one JVM produce duplicate spans.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Java 8 or later (check the compatibility matrix of the agent version you choose).&lt;/li&gt;
&lt;li&gt;  A Dynatrace API token with the &lt;code&gt;openTelemetryTrace.ingest&lt;/code&gt;, &lt;code&gt;metrics.ingest&lt;/code&gt; and &lt;code&gt;logs.ingest&lt;/code&gt; scopes.&lt;/li&gt;
&lt;li&gt;  The OTLP endpoint URL:

&lt;ul&gt;
&lt;li&gt;SaaS: &lt;code&gt;https://&amp;lt;env-id&amp;gt;.live.dynatrace.com/api/v2/otlp&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;Managed: &lt;code&gt;https://&amp;lt;your-domain&amp;gt;/e/&amp;lt;env-id&amp;gt;/api/v2/otlp&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;through an ActiveGate: &lt;code&gt;https://&amp;lt;activegate&amp;gt;:9999/e/&amp;lt;env-id&amp;gt;/api/v2/otlp&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;  Outbound HTTPS access from the application, or an intermediate Collector.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps to set up the OpenTelemetry Java agent for Dynatrace
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Download the agent
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -p /opt/otel
curl -fsSL -o /opt/otel/opentelemetry-javaagent.jar \
  https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In production, replace &lt;code&gt;latest&lt;/code&gt; with a pinned version (for example &lt;code&gt;download/v2.x.y/&lt;/code&gt;) so every build is reproducible, and test upgrades like any other dependency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Configure export to Dynatrace
&lt;/h3&gt;

&lt;p&gt;Create an environment file &lt;code&gt;/etc/checkout/otel.env&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OTEL_SERVICE_NAME=checkout
OTEL_RESOURCE_ATTRIBUTES=service.version=1.4.2,deployment.environment.name=production
OTEL_EXPORTER_OTLP_ENDPOINT=https://abc12345.live.dynatrace.com/api/v2/otlp
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Api-Token%20dt0c01.XXXX.YYYY
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=delta
OTEL_PROPAGATORS=tracecontext,baggage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt;: the base URL, without &lt;code&gt;/v1/traces&lt;/code&gt;. The agent appends &lt;code&gt;/v1/traces&lt;/code&gt;, &lt;code&gt;/v1/metrics&lt;/code&gt; and &lt;code&gt;/v1/logs&lt;/code&gt; itself.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;OTEL_EXPORTER_OTLP_HEADERS&lt;/code&gt;: the space between &lt;code&gt;Api-Token&lt;/code&gt; and the token is encoded as &lt;code&gt;%20&lt;/code&gt;, as the OpenTelemetry environment variable specification requires.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;http/protobuf&lt;/code&gt;: the Dynatrace OTLP API expects HTTP with protobuf. For gRPC, go through a Collector.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;delta&lt;/code&gt;: Dynatrace expects metrics with delta temporality. Without this line, counters may be rejected: the full story is in &lt;a href="https://span.observer/en/otlp-metrics-delta-temporality-dynatrace/" rel="noopener noreferrer"&gt;OTLP metrics temporality&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Never commit this file with the token: inject it from your secrets manager.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Start the JVM with the agent (VM or bare metal)
&lt;/h3&gt;

&lt;p&gt;A minimal systemd unit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight systemd"&gt;&lt;code&gt;&lt;span class="k"&gt;[Unit]&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Checkout&lt;/span&gt; &lt;span class="n"&gt;service&lt;/span&gt;
&lt;span class="na"&gt;After&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;network&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;online&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;

&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;EnvironmentFile&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;checkout&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;otel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;
&lt;span class="na"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;java&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;javaagent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;otel&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;opentelemetry&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;javaagent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;jar&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;jar&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;opt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;checkout&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;jar&lt;/span&gt;
&lt;span class="na"&gt;Restart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;failure&lt;/span&gt;

&lt;span class="k"&gt;[Install]&lt;/span&gt;
&lt;span class="na"&gt;WantedBy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;multi&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl daemon-reload
sudo systemctl restart checkout
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-javaagent&lt;/code&gt; option must come before &lt;code&gt;-jar&lt;/code&gt;, otherwise it is passed to the application as an argument and ignored.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — The Kubernetes variant
&lt;/h3&gt;

&lt;p&gt;Copy the agent into a shared volume with an init container, then load it with &lt;code&gt;JAVA_TOOL_OPTIONS&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apps/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;checkout&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;app:&lt;/span&gt; &lt;span class="s"&gt;checkout&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;app:&lt;/span&gt; &lt;span class="s"&gt;checkout&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;otel&lt;/span&gt;
          &lt;span class="na"&gt;emptyDir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;initContainers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;otel-agent&lt;/span&gt;
          &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;curlimages/curl:8.10.1&lt;/span&gt;
          &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"curl"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"-fsSL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"-o"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/otel/opentelemetry-javaagent.jar"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v2.10.0/opentelemetry-javaagent.jar"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
          &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;otel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;mountPath:&lt;/span&gt; &lt;span class="s"&gt;/otel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;app&lt;/span&gt;
          &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;registry.example.com/checkout:1.4.2&lt;/span&gt;
          &lt;span class="na"&gt;envFrom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;secretRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;checkout-otel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;JAVA_TOOL_OPTIONS&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"-javaagent:/otel/opentelemetry-javaagent.jar"&lt;/span&gt;
          &lt;span class="na"&gt;volumeMounts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;name:&lt;/span&gt; &lt;span class="s"&gt;otel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;mountPath:&lt;/span&gt; &lt;span class="s"&gt;/otel&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;checkout-otel&lt;/code&gt; secret holds the variables from step 2. The agent version and curl image are examples: use a released version you have validated. With the OpenTelemetry Operator, the &lt;code&gt;Instrumentation&lt;/code&gt; resource automates this injection. For centralised export, point the endpoint at an &lt;a href="https://span.observer/en/opentelemetry-collector-dynatrace-setup/" rel="noopener noreferrer"&gt;OpenTelemetry Collector&lt;/a&gt; that holds the token instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Startup logs&lt;/strong&gt;: the JVM prints a line such as &lt;code&gt;opentelemetry-javaagent - version: 2.x.y&lt;/code&gt;. If it is missing, the agent is not loaded.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Export errors&lt;/strong&gt;: search the logs for &lt;code&gt;Failed to export&lt;/code&gt;. A 401 or 403 means a wrong token or scope; a 404 means a wrong endpoint URL.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;One-off debug mode&lt;/strong&gt;: &lt;code&gt;OTEL_JAVAAGENT_DEBUG=true&lt;/code&gt; prints spans to the console. Remove it afterwards, it is very verbose.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;In Dynatrace SaaS&lt;/strong&gt;, run this in a Notebook:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 15m
| filter service.name == "checkout"
| summarize requetes = count(), by: { span.name }
| sort requetes desc
| limit 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the application’s HTTP routes. For logs: &lt;code&gt;fetch logs | filter service.name == "checkout" | limit 20&lt;/code&gt;. On &lt;strong&gt;Managed&lt;/strong&gt;, the service appears in the services list and the traces in the distributed traces view; metrics are visible in the data explorer. The exact screens depend on your version: see the &lt;a href="https://docs.dynatrace.com/docs/ingest-from/opentelemetry" rel="noopener noreferrer"&gt;Dynatrace OpenTelemetry documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;No data, no error&lt;/strong&gt;: the image does not read &lt;code&gt;JAVA_TOOL_OPTIONS&lt;/code&gt; (some base images redefine it in their startup script). Check with &lt;code&gt;kubectl exec&lt;/code&gt; that the JVM prints «&amp;nbsp;Picked up JAVA_TOOL_OPTIONS&amp;nbsp;».&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Traces present, metrics missing&lt;/strong&gt;: temporality stayed cumulative, or the token lacks the &lt;code&gt;metrics.ingest&lt;/code&gt; scope.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Duplicated logs&lt;/strong&gt;: the application already writes to standard output, collected by another agent. Choose a single path for logs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Slower startup&lt;/strong&gt;: the agent adds cost to JVM startup. Adjust readiness probes if they fail after adding the agent.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;TLS errors&lt;/strong&gt;: behind a corporate proxy, the JVM must trust the proxy certificate (Java truststore), otherwise export fails silently from the application’s point of view.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  One stable &lt;code&gt;service.name&lt;/code&gt; per service: it carries SLOs and alerts, see &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Set &lt;code&gt;service.version&lt;/code&gt; on every deployment: comparing two versions becomes instant.&lt;/li&gt;
&lt;li&gt;  Disable unneeded instrumentations rather than filtering afterwards (&lt;code&gt;OTEL_INSTRUMENTATION_&amp;lt;NAME&amp;gt;_ENABLED=false&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  Sample with care: overly aggressive client-side sampling distorts SLIs computed from spans.&lt;/li&gt;
&lt;li&gt;  Never run the OpenTelemetry agent in a JVM already instrumented by OneAgent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Do I need to change the application code?
&lt;/h3&gt;

&lt;p&gt;Not for basic instrumentation: the agent automatically instruments common frameworks (HTTP, JDBC, messaging). Add the OpenTelemetry API only for business spans or attributes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Direct export or through a Collector?
&lt;/h3&gt;

&lt;p&gt;Direct export suits a test or a handful of services. Beyond that, a Collector centralises the token, filtering and retries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are application logs captured?
&lt;/h3&gt;

&lt;p&gt;The agent hooks into the appenders of common logging libraries (Logback, Log4j) when log export is on, with the related trace ID. Check your library in the list of supported instrumentations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With one JAR and about ten variables, the OpenTelemetry Java agent sends traces, metrics and logs to Dynatrace without touching the code. Pin the version, enforce delta temporality, keep one instrumentation owner per process and verify in Grail. Your SLOs then rest on standard, portable data.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. Features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/opentelemetry-java-agent-dynatrace/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/agent-opentelemetry-java-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/agent-opentelemetry-java-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>distributedtracing</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
      <category>instrumentation</category>
    </item>
    <item>
      <title>OneAgent OpenTelemetry duplicate spans: how to avoid them and keep context intact</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 19:30:16 +0000</pubDate>
      <link>https://dev.to/spanobserver/oneagent-opentelemetry-duplicate-spans-how-to-avoid-them-and-keep-context-intact-p7p</link>
      <guid>https://dev.to/spanobserver/oneagent-opentelemetry-duplicate-spans-how-to-avoid-them-and-keep-context-intact-p7p</guid>
      <description>&lt;p&gt;A team adds the OpenTelemetry Java agent to a service that OneAgent already monitors. The result: every request shows up twice, a trace stops dead halfway down the call chain, and nobody knows which response time to trust. OneAgent OpenTelemetry duplicate spans are a common problem, and the fix is a simple architecture decision: one instrumentation owner per process.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: find the cause of duplicate spans or broken context, choose the right coexistence mode, then check that each request produces a single, complete trace. The content applies to both &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; and &lt;strong&gt;Dynatrace Managed&lt;/strong&gt;; the trace analysis screens differ, the logic is the same.&lt;/p&gt;

&lt;p&gt;For the big picture of an end-to-end instrumented chain, also read &lt;a href="https://span.observer/en/opentelemetry-end-to-end-dynatrace/" rel="noopener noreferrer"&gt;OpenTelemetry end to end with Dynatrace&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why OneAgent and OpenTelemetry create duplicate spans
&lt;/h2&gt;

&lt;p&gt;Three causes come up almost every time:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Two auto-instrumentations in the same process.&lt;/strong&gt; OneAgent instruments the JVM (or the .NET, Node.js… runtime) and the OpenTelemetry agent instruments the same HTTP and JDBC libraries. Each call produces two spans, sent along two different paths.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;OpenTelemetry spans captured twice.&lt;/strong&gt; OneAgent can capture spans created with the OpenTelemetry API in a process it monitors. If the application also exports those spans over OTLP to Dynatrace, they arrive once through OneAgent and once through OTLP.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Broken context propagation.&lt;/strong&gt; Service A sends a &lt;code&gt;traceparent&lt;/code&gt; header (W3C Trace Context) that service B ignores, or a proxy strips the headers. B starts a new trace: the chain is cut in two.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  A Dynatrace SaaS or Managed environment with OneAgent in full-stack mode on the hosts or through Dynatrace Operator.&lt;/li&gt;
&lt;li&gt;  Read access to the environment settings (OneAgent features, process monitoring).&lt;/li&gt;
&lt;li&gt;  For OpenTelemetry services: an API token with the &lt;code&gt;openTelemetryTrace.ingest&lt;/code&gt; scope and an OTLP endpoint, direct or through the &lt;a href="https://span.observer/en/opentelemetry-collector-dynatrace-setup/" rel="noopener noreferrer"&gt;OpenTelemetry Collector&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Shell or &lt;code&gt;kubectl&lt;/code&gt; access to the processes involved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps to remove OneAgent OpenTelemetry duplicate spans
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Inventory who instruments what
&lt;/h3&gt;

&lt;p&gt;On a host, list the agents loaded into the JVMs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Java agents loaded at startup&lt;/span&gt;
ps -eo pid,args &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s1"&gt;'javaagent|JAVA_TOOL_OPTIONS'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -v grep

&lt;span class="c"&gt;# OpenTelemetry variables of a process (replace 1234 with the PID)&lt;/span&gt;
tr &lt;span class="s1"&gt;'\0'&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; /proc/1234/environ &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s1"&gt;'^OTEL_|JAVA_TOOL_OPTIONS'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Kubernetes, look for both possible injections in the pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pod checkout-7d9f -n shop -o yaml \
  &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s1"&gt;'instrumentation.opentelemetry.io|oneagent.dynatrace.com|JAVA_TOOL_OPTIONS'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see both a OneAgent injection and the OpenTelemetry Operator annotation &lt;code&gt;instrumentation.opentelemetry.io/inject-java: "true"&lt;/code&gt;, the process has two owners.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Choose one owner per process
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Who instruments&lt;/th&gt;
&lt;th&gt;When to choose it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A. OneAgent owns it&lt;/td&gt;
&lt;td&gt;OneAgent; the OpenTelemetry API is used only for manual business spans&lt;/td&gt;
&lt;td&gt;Services already monitored by OneAgent, teams that want PurePath and profiling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B. OpenTelemetry owns it&lt;/td&gt;
&lt;td&gt;OpenTelemetry SDK or agent; OneAgent stays on the host without instrumenting this process&lt;/td&gt;
&lt;td&gt;Teams standardising on OpenTelemetry, multi-tool portability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C. Mixed per service&lt;/td&gt;
&lt;td&gt;A for some services, B for others&lt;/td&gt;
&lt;td&gt;Gradual migration; requires end-to-end W3C propagation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;What you must never do: run two active auto-instrumentations in the same JVM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3a — Mode A: OneAgent owns the process
&lt;/h3&gt;

&lt;p&gt;Remove the OpenTelemetry agent from startup and turn off OTLP trace export. Keep the OpenTelemetry API in the code if you create business spans:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Remove -javaagent:opentelemetry-javaagent.jar from JAVA_TOOL_OPTIONS&lt;/span&gt;
&lt;span class="c"&gt;# If an OpenTelemetry SDK is still initialised in the code:&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_TRACES_EXPORTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;none
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check in the OneAgent features settings that the OneAgent code module’s OpenTelemetry Span Sensor is enabled for your technology (available for Java, Go, Node.js, PHP and .NET). The exact option name varies by language and version; search for «&amp;nbsp;OpenTelemetry&amp;nbsp;» in the list and confirm in the &lt;a href="https://docs.dynatrace.com/docs/ingest-from/opentelemetry" rel="noopener noreferrer"&gt;Dynatrace OpenTelemetry documentation&lt;/a&gt;. A process restart is usually required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3b — Mode B: OpenTelemetry owns the process
&lt;/h3&gt;

&lt;p&gt;Stop OneAgent from instrumenting the process without removing it from the host. On Kubernetes with Dynatrace Operator, disable injection at pod level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apps/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deployment&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;checkout&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;oneagent.dynatrace.com/inject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"false"&lt;/span&gt;
        &lt;span class="na"&gt;instrumentation.opentelemetry.io/inject-java&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a classic host, create a process monitoring rule that excludes this process from deep monitoring (Settings → Processes and containers, depending on your version). OneAgent still collects host metrics. Operator details are in &lt;a href="https://span.observer/en/dynatrace-operator-kubernetes-openshift-managed/" rel="noopener noreferrer"&gt;Dynatrace Operator on Kubernetes&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Fix context propagation
&lt;/h3&gt;

&lt;p&gt;For mixed chains, both worlds must speak W3C Trace Context. On the OpenTelemetry side, set the propagators explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_PROPAGATORS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tracecontext,baggage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the OneAgent side, check in the distributed tracing settings that sending W3C Trace Context headers is enabled (it is on by default in recent versions; confirm on yours). Also check proxies, API gateways and service meshes: they must forward &lt;code&gt;traceparent&lt;/code&gt; and &lt;code&gt;tracestate&lt;/code&gt; without rewriting them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it works
&lt;/h2&gt;

&lt;p&gt;Send a test request with a known &lt;code&gt;traceparent&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -w &lt;span class="s1"&gt;'%{http_code}\n'&lt;/span&gt; \
  -H &lt;span class="s1"&gt;'traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01'&lt;/span&gt; \
  https://checkout.example.internal/api/cart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On &lt;strong&gt;SaaS&lt;/strong&gt;, look for that trace in Grail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 15m
| filter trace.id == "4bf92f3577b34da6a3ce929d0e0e4736"
| summarize spans = count(), by: { dt.entity.service, span.name }
| sort spans desc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected: each service/operation pair appears once per real call. Two different services for the same process (for example one named by OneAgent and one named by &lt;code&gt;service.name&lt;/code&gt;) point to double instrumentation. Field names may vary: check them with &lt;code&gt;fetch spans | limit 1&lt;/code&gt;. On &lt;strong&gt;Managed&lt;/strong&gt;, open the distributed traces view, filter on the service and check that the trace contains every expected service, with no duplicated node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Write the rule into your platform standards: one process, one instrumentation owner.&lt;/li&gt;
&lt;li&gt;  During a migration, use the same &lt;code&gt;service.name&lt;/code&gt; as the service name OneAgent shows, to keep SLO continuity.&lt;/li&gt;
&lt;li&gt;  After each change, compare request counts before and after: a volume halved means a duplicate is gone, not that traffic dropped.&lt;/li&gt;
&lt;li&gt;  Duplicates also inflate licence consumption and distort SLIs: treat them as a reliability risk, see &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I keep OneAgent and the OpenTelemetry API in the same service?
&lt;/h3&gt;

&lt;p&gt;Yes, that is mode A. The OpenTelemetry API creates business spans; OneAgent captures them. Duplicates only appear if an OTLP exporter also sends those spans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are OpenTelemetry metrics duplicated too?
&lt;/h3&gt;

&lt;p&gt;They are not captured by the same mechanism as spans. The main risk is exporting the same metric twice through two paths (SDK and Collector, for example). Check your export pipelines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does mixed mode weaken analysis?
&lt;/h3&gt;

&lt;p&gt;It works if W3C propagation is complete. Some OneAgent-specific analyses, such as code profiling, are missing for services instrumented only with OpenTelemetry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;OneAgent OpenTelemetry duplicate spans are not a bug to work around but the symptom of two competing instrumentations. Take inventory, choose one owner per process, enforce W3C Trace Context, then verify trace by trace. Your SLIs become trustworthy again, and so does incident analysis.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. Features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/oneagent-opentelemetry-duplicate-spans/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/oneagent-opentelemetry-doublons-spans/" rel="noopener noreferrer"&gt;https://span.observer/fr/oneagent-opentelemetry-doublons-spans/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>distributedtracing</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
      <category>instrumentation</category>
    </item>
    <item>
      <title>VictoriaMetrics Prometheus: replace or complement?</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 17:30:16 +0000</pubDate>
      <link>https://dev.to/spanobserver/victoriametrics-prometheus-replace-or-complement-4e60</link>
      <guid>https://dev.to/spanobserver/victoriametrics-prometheus-replace-or-complement-4e60</guid>
      <description>&lt;p&gt;Your Prometheus is getting heavy: the disk fills up, thirty-day queries crawl, and someone suggests «&amp;nbsp;moving on&amp;nbsp;». &lt;strong&gt;VictoriaMetrics Prometheus&lt;/strong&gt; then comes up in the discussion: should you replace Prometheus, or just extend it? The right answer depends on what you want to stop operating, not on a benchmark.&lt;/p&gt;

&lt;p&gt;The facts come from docs.victoriametrics.com and the VictoriaMetrics/VictoriaMetrics repository, read on 13 November 2026. I did not deploy the stack to write this. I did not record the star count or the latest version number: check the repository’s releases page.&lt;/p&gt;

&lt;p&gt;This piece is separate from &lt;a href="https://span.observer/en/thanos-prometheus-high-availability/" rel="noopener noreferrer"&gt;Thanos&lt;/a&gt; and &lt;a href="https://span.observer/en/grafana-mimir-prometheus-metrics-storage/" rel="noopener noreferrer"&gt;Grafana Mimir&lt;/a&gt;, which tackle the same pain with a different architecture. For rules, see &lt;a href="https://span.observer/en/prometheus-recording-rules-naming/" rel="noopener noreferrer"&gt;naming recording rules&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three operating decisions before picking a tool
&lt;/h2&gt;

&lt;p&gt;Ask your team these questions before comparing products.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Who scrapes?&lt;/strong&gt; Keep Prometheus for collection and rules, or hand scraping to another agent.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Where does the data live?&lt;/strong&gt; On each Prometheus disk, or in a central store queried as one.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;How much complexity do you accept?&lt;/strong&gt; One binary, or several components to monitor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VictoriaMetrics can answer all three, which is why «&amp;nbsp;replace&amp;nbsp;» and «&amp;nbsp;complement&amp;nbsp;» get confused.&lt;/p&gt;

&lt;h2&gt;
  
  
  VictoriaMetrics Prometheus: complementing with remote write
&lt;/h2&gt;

&lt;p&gt;The lowest-risk scenario removes nothing. Prometheus keeps scraping and evaluating rules, and sends a copy of the samples to VictoriaMetrics. The repository presents the product as long-term storage for Prometheus with a global view: several instances can write to it and one query reads them all.&lt;/p&gt;

&lt;p&gt;The configuration is two lines in &lt;code&gt;prometheus.yml&lt;/code&gt;. The write URL, with port 8428 of the single-node version, appears in the vmagent documentation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fas36atujr2g2755guekr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fas36atujr2g2755guekr.png" alt="A prometheus.yml file with a remote\_write section pointing to port 8428 and path /api/v1/write, then a vmagent command with promscrape.config and remoteWrite.url taken from the documentation" width="799" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source : &lt;a href="https://docs.victoriametrics.com/" rel="noopener noreferrer"&gt;docs.victoriametrics.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You keep your current alerts and dashboards. You gain a second place to read metrics, and you can cut Prometheus retention to a few days. The cost: one more component to monitor, and the reliability of the sending, which you must watch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Replacing Prometheus with vmagent
&lt;/h2&gt;

&lt;p&gt;Replacement goes further. &lt;code&gt;vmagent&lt;/code&gt; reads the same configuration file as Prometheus (&lt;code&gt;-promscrape.config&lt;/code&gt;) and ships data to a compatible store with &lt;code&gt;-remoteWrite.url&lt;/code&gt;. The documentation says it uses less RAM, CPU and disk than Prometheus, without a figure worth repeating here: measure on your own targets.&lt;/p&gt;

&lt;p&gt;One detail matters for network outages. When the store is unreachable, vmagent buffers data on disk in &lt;code&gt;-remoteWrite.tmpDataPath&lt;/code&gt;, then resends it once the connection returns. Cap that buffer with &lt;code&gt;-remoteWrite.maxDiskUsagePerURL&lt;/code&gt;. You can also pass several &lt;code&gt;-remoteWrite.url&lt;/code&gt; flags to replicate to several stores.&lt;/p&gt;

&lt;p&gt;Careful: vmagent collects, it does not evaluate your alert rules. The project documentation points to a separate component, vmalert, which I did not detail here. Check this before deleting a Prometheus that carries your alerts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Single-node or cluster: the real trade-off
&lt;/h2&gt;

&lt;p&gt;The single-node version is one binary, configured by command-line flags, with no dependencies. Data goes to &lt;code&gt;-storageDataPath&lt;/code&gt; (by default the &lt;code&gt;victoria-metrics-data&lt;/code&gt; folder in the working directory), and retention is set with &lt;code&gt;-retentionPeriod&lt;/code&gt;: one month (31 days) by default according to the documentation. The documentation says a single node can stand in for mid-sized clusters built with other solutions.&lt;/p&gt;

&lt;p&gt;The cluster separates roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;vminsert&lt;/strong&gt; accepts data and spreads it across vmstorage nodes by consistent hashing (port 8480 for &lt;code&gt;/insert&lt;/code&gt;);&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;vmselect&lt;/strong&gt; answers queries by reading every vmstorage (port 8481 for &lt;code&gt;/select&lt;/code&gt;);&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;vmstorage&lt;/strong&gt; stores the raw data (port 8482 for its HTTP endpoints).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2hlei8rdrar729lxd2jb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2hlei8rdrar729lxd2jb.png" alt="Options quoted from the cluster documentation: replicationFactor=2 on vminsert, dedup.minScrapeInterval=1ms on vmselect, retentionPeriod and storageDataPath on vmstorage, and ports 8480, 8481 and 8482" width="799" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source : &lt;a href="https://docs.victoriametrics.com/" rel="noopener noreferrer"&gt;docs.victoriametrics.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Replication is enabled with &lt;code&gt;-replicationFactor=N&lt;/code&gt; on vminsert, and the documentation then requires &lt;code&gt;-dedup.minScrapeInterval=1ms&lt;/code&gt; on vmselect. The cluster also supports several isolated tenants. One point to remember: when you add vmstorage nodes, historical data stays on the old nodes. The project explains its choice not to rebalance automatically, to avoid failures that are hard to troubleshoot.&lt;/p&gt;

&lt;p&gt;My rule of thumb: start single-node while one machine copes, and move to the cluster when you need to write and read in parallel across nodes. The page I read gives no official threshold, and I do not invent one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes for queries and licensing
&lt;/h2&gt;

&lt;p&gt;VictoriaMetrics accepts PromQL and offers MetricsQL, described as a PromQL-like language with extra functions. Your PromQL dashboards should keep working, but test them one by one: I did not verify the exact list of differences. If you write MetricsQL, you create a dependency on that engine.&lt;/p&gt;

&lt;p&gt;On licensing, the repository carries an Apache 2.0 licence, confirmed in the LICENSE file, and the README says the single-node and cluster versions are covered by it. An Enterprise edition also exists, including downsampling, multiple retentions and anomaly detection. If you rely on downsampling, you need a paid licence or a free trial: read the Enterprise page before choosing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Start with remote write: you undo it by deleting two lines.&lt;/li&gt;
&lt;li&gt;  Compare the queries behind your main dashboards on both backends before switching the old one off.&lt;/li&gt;
&lt;li&gt;  Monitor vmagent’s disk buffer and the storage size.&lt;/li&gt;
&lt;li&gt;  Plan backups: the documentation names vmbackup and vmrestore, built on instant snapshots.&lt;/li&gt;
&lt;li&gt;  Check that no function you depend on is reserved for the Enterprise edition.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does VictoriaMetrics replace Prometheus?
&lt;/h3&gt;

&lt;p&gt;It can replace it for collection (vmagent) and storage, or complement it through remote write. Alert rules belong to another component: verify this before removing anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is VictoriaMetrics open source?
&lt;/h3&gt;

&lt;p&gt;The repository is under Apache 2.0 for the single-node and cluster versions. Some features, such as downsampling, belong to the Enterprise edition.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does Dynatrace say about this?
&lt;/h3&gt;

&lt;p&gt;This article covers third-party open source tools only. For Prometheus metrics on the Dynatrace side, see docs.dynatrace.com without mixing SaaS and Managed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Complement first, replace later if the operating gain is measured. Sources: &lt;a href="https://docs.victoriametrics.com/" rel="noopener noreferrer"&gt;VictoriaMetrics documentation&lt;/a&gt;, &lt;a href="https://github.com/VictoriaMetrics/VictoriaMetrics" rel="noopener noreferrer"&gt;VictoriaMetrics/VictoriaMetrics repository&lt;/a&gt;. To place Prometheus against open telemetry, also read &lt;a href="https://span.observer/en/opentelemetry-vs-prometheus-comparison/" rel="noopener noreferrer"&gt;OpenTelemetry and Prometheus&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent blog, not affiliated with Dynatrace LLC or the VictoriaMetrics project. Brand names belong to their owners. Tools change fast: check commands and options in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/victoriametrics-prometheus-replace-or-complement/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/victoriametrics-prometheus-remplacer-completer/" rel="noopener noreferrer"&gt;https://span.observer/fr/victoriametrics-prometheus-remplacer-completer/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>apache20</category>
      <category>longtermstorage</category>
      <category>metrics</category>
      <category>metricsql</category>
    </item>
    <item>
      <title>Error budget release gate: block a production release with Dynatrace (SaaS and Managed)</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 15:30:18 +0000</pubDate>
      <link>https://dev.to/spanobserver/error-budget-release-gate-block-a-production-release-with-dynatrace-saas-and-managed-mc7</link>
      <guid>https://dev.to/spanobserver/error-budget-release-gate-block-a-production-release-with-dynatrace-saas-and-managed-mc7</guid>
      <description>&lt;p&gt;Friday, 4 pm: a release goes out while the service has already used 90% of its error budget for the month. Nobody checked, because that number lives on a dashboard the pipeline never reads. An error budget release gate fixes this: the CI/CD pipeline asks Dynatrace before it deploys and stops if the budget is too low.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: build a release gate that computes a service’s remaining error budget, compares it with a threshold and returns a verdict your pipeline can act on. The &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; version uses a Workflow with a DQL task and a JavaScript task. The &lt;strong&gt;Dynatrace Managed&lt;/strong&gt; version, which has no Workflows app, reads the SLO through API v2.&lt;/p&gt;

&lt;p&gt;This tutorial assumes an SLO already exists. If it does not, start with &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts in Dynatrace&lt;/a&gt;, which walks through the budget maths.&lt;/p&gt;

&lt;h2&gt;
  
  
  How an error budget release gate works
&lt;/h2&gt;

&lt;p&gt;The error budget is what the SLO allows you to miss. With 99.9% over 30 days, the budget is 0.1% of requests. While budget remains, the team ships. When it is nearly gone, the team slows down and prioritises reliability. This is the error budget policy described in the SRE literature.&lt;/p&gt;

&lt;p&gt;The gate enforces that policy without a meeting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Remaining budget ≥ 25%&lt;/strong&gt;: the deployment continues.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Remaining budget &amp;lt; 25%&lt;/strong&gt;: the deployment is blocked, except for reliability fixes approved by on-call.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;High burn rate over the last hour&lt;/strong&gt;: also blocked, because an incident is in progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thresholds are examples. Agree them with the product team and write them into your error budget policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;SaaS&lt;/strong&gt;: a Grail environment, access to the Workflows app, permission to read metrics. To start the Workflow from CI: an OAuth client or platform token allowed to run and read Workflows (scopes such as &lt;code&gt;automation:workflows:run&lt;/code&gt; and &lt;code&gt;automation:workflows:read&lt;/code&gt;; check the exact names in the documentation).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Managed&lt;/strong&gt;: an existing classic SLO, an API token with the &lt;code&gt;slo.read&lt;/code&gt; scope, and &lt;code&gt;curl&lt;/code&gt; + &lt;code&gt;jq&lt;/code&gt; on the CI runner.&lt;/li&gt;
&lt;li&gt;  A service monitored by OneAgent or OpenTelemetry, with steady traffic. For the OpenTelemetry route, see &lt;a href="https://span.observer/en/opentelemetry-collector-dynatrace-setup/" rel="noopener noreferrer"&gt;the OpenTelemetry Collector for Dynatrace&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Steps in Dynatrace SaaS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Write the budget DQL query
&lt;/h3&gt;

&lt;p&gt;Test the query in a Notebook first. It computes the 30-day SLI, the remaining budget and the burn rate over the last hour:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timeseries {
    total = sum(dt.service.request.count),
    failures = sum(dt.service.request.failure_count)
  },
  from: now() - 30d,
  filter: { dt.entity.service == "SERVICE-1234567890ABCDEF" }
| fieldsAdd t = arraySum(total), f = arraySum(failures)
| fieldsAdd sli = 100 * (t - f) / t
| fieldsAdd budget_restant = 100 * (1 - (f / t) / 0.001)
| fields sli, budget_restant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: &lt;code&gt;0.001&lt;/code&gt; is the error rate a 99.9% SLO allows. &lt;code&gt;budget_restant&lt;/code&gt; (remaining budget) is 100 when there were no errors and goes negative once the budget is exceeded. For the recent burn rate, duplicate the query with &lt;code&gt;from: now() - 1h&lt;/code&gt; and compute &lt;code&gt;(f / t) / 0.001&lt;/code&gt;. If you already have an SLO in the Service-Level Objectives app, keep the same SLI definition so the gate and the SLO show the same numbers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Create the Workflow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; Open &lt;strong&gt;Workflows&lt;/strong&gt; and create a Workflow named &lt;code&gt;release-gate-checkout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; Keep an on-demand trigger: the pipeline will start it.&lt;/li&gt;
&lt;li&gt; Add an &lt;strong&gt;Execute DQL Query&lt;/strong&gt; task named &lt;code&gt;budget&lt;/code&gt; with the query from step 1.&lt;/li&gt;
&lt;li&gt; Add a &lt;strong&gt;Run JavaScript&lt;/strong&gt; task named &lt;code&gt;verdict&lt;/code&gt; that depends on &lt;code&gt;budget&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Code for the &lt;code&gt;verdict&lt;/code&gt; task:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;execution&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@dynatrace-sdk/automation-utils'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SEUIL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// minimum remaining budget in %&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;execution_id&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;execution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;execution_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'budget'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ligne&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;ligne&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;ligne&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;budget_restant&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'No data: gate closed as a precaution'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;budget&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ligne&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;budget_restant&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;budget&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;SEUIL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Remaining budget ${budget.toFixed(1)} % &amp;lt; ${SEUIL} %: deployment blocked`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;budget&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;decision&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'go'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: an exception fails the task, and therefore the Workflow execution. The pipeline only has one state to read. Missing data closes the gate: a silent SLI must never count as a green light. The exact shape of the DQL task result may change; print it once with &lt;code&gt;console.log(res)&lt;/code&gt; to confirm the &lt;code&gt;records&lt;/code&gt; path.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Call the gate from the pipeline
&lt;/h3&gt;

&lt;p&gt;A bash example that works in GitLab CI, GitHub Actions or Jenkins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; -euo pipefail
&lt;span class="nv"&gt;BASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://${DT_ENV}.apps.dynatrace.com/platform/automation/v1"&lt;/span&gt;
&lt;span class="nv"&gt;AUTH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Authorization: Bearer ${DT_PLATFORM_TOKEN}"&lt;/span&gt;

&lt;span class="nv"&gt;EXEC_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -sf -X POST &lt;span class="s2"&gt;"$BASE/workflows/${WF_ID}/run"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"$AUTH"&lt;/span&gt; -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; -d &lt;span class="s1"&gt;'{}'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.id'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$(&lt;/span&gt;seq 1 30&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="nv"&gt;STATE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -sf &lt;span class="s2"&gt;"$BASE/executions/${EXEC_ID}"&lt;/span&gt; -H &lt;span class="s2"&gt;"$AUTH"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.state'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s2"&gt;"$STATE"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
    SUCCESS&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Gate open"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 0 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    ERROR&lt;span class="o"&gt;|&lt;/span&gt;CANCELLED&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Gate closed ($STATE)"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 1 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;esac&lt;/span&gt;
  sleep 10
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Timeout: gate closed"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: &lt;code&gt;.id&lt;/code&gt; is the execution ID; &lt;code&gt;.state&lt;/code&gt; goes through &lt;code&gt;RUNNING&lt;/code&gt; and then a final state. Check the paths and state values in the &lt;a href="https://docs.dynatrace.com/docs/analyze-explore-automate/workflows" rel="noopener noreferrer"&gt;Workflows documentation&lt;/a&gt; and the Automation API reference. The timeout also closes the gate, again as a precaution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The equivalent step in Dynatrace Managed
&lt;/h2&gt;

&lt;p&gt;Managed has no Workflows. The pipeline reads the classic SLO directly through Environment API v2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;SLO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -sf &lt;span class="s2"&gt;"https://${DT_DOMAIN}/e/${DT_ENV_ID}/api/v2/slo/${SLO_ID}?timeFrame=CURRENT"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Api-Token ${DT_API_TOKEN}"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;BUDGET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$SLO"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.errorBudget'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Error budget: $BUDGET"&lt;/span&gt;
&lt;span class="c"&gt;# errorBudget is expressed in SLI percentage points (e.g. 0.08 against a 99.9 target)&lt;/span&gt;
awk -v &lt;span class="nv"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$BUDGET"&lt;/span&gt; &lt;span class="s1"&gt;'BEGIN { exit !(b &amp;gt;= 0.025) }'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Gate closed"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 1&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;errorBudget&lt;/code&gt; field returns the margin between the SLI and the target, not a percentage of the initial budget. With a 99.9 target, the maximum margin is 0.1, so 25% of the budget is 0.025. Confirm the field’s meaning and the &lt;code&gt;timeFrame&lt;/code&gt; parameter in the &lt;a href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/service-level-objectives" rel="noopener noreferrer"&gt;SLO API documentation&lt;/a&gt; for your cluster version.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Passing case&lt;/strong&gt;: run the Workflow by hand. The execution should succeed and the &lt;code&gt;verdict&lt;/code&gt; result should show &lt;code&gt;decision: "go"&lt;/code&gt; with the budget.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Blocking case&lt;/strong&gt;: temporarily set &lt;code&gt;SEUIL&lt;/code&gt; to 101. The execution should fail with the «&amp;nbsp;deployment blocked&amp;nbsp;» message and the pipeline script should exit with code 1.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;No-data case&lt;/strong&gt;: replace the service ID with one that does not exist. The gate should close.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Audit trail&lt;/strong&gt;: in Workflows, the executions tab keeps every verdict. On Managed, keep the CI job output.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then restore the real values. A test that has never seen the gate closed proves nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Provide an explicit override (pipeline variable, manual approval) for reliability fixes: blocking the fix for an incident makes MTTR worse.&lt;/li&gt;
&lt;li&gt;  One SLO per user journey, not per microservice. A service’s gate reads the SLO of the journey it serves.&lt;/li&gt;
&lt;li&gt;  Combine remaining budget and recent burn rate: a large budget does not protect you from an incident in progress.&lt;/li&gt;
&lt;li&gt;  After a block, run a blameless review: the gate flags a risk, it does not name a culprit.&lt;/li&gt;
&lt;li&gt;  For richer checks (several objectives, before/after comparison), look at Site Reliability Guardian in the documentation, which covers the same need on SaaS.&lt;/li&gt;
&lt;li&gt;  Manage your Workflows as code: see &lt;a href="https://span.observer/en/dynatrace-workflows-automation/" rel="noopener noreferrer"&gt;the Workflows and automation module&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why not read the SLO directly in the SaaS Workflow?
&lt;/h3&gt;

&lt;p&gt;You can, if your SLO exposes its values through DQL or a dedicated action. The explicit query has one advantage: the calculation is visible and testable in a Notebook. Keep a single SLI definition to avoid two versions of the truth.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which threshold should block a release?
&lt;/h3&gt;

&lt;p&gt;Start loose (25%, for example) and adjust after a few weeks. A threshold that is too strict blocks often, and the team ends up bypassing the gate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the gate replace tests?
&lt;/h3&gt;

&lt;p&gt;No. Tests validate the code you ship; the gate checks that the service can take on new risk. They complement each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;An error budget release gate turns the error budget policy into an automatic rule: the pipeline reads Dynatrace and decides. Start with one critical service and a cautious threshold, test the blocking case, then extend to other teams. For the SRE culture behind this practice, read &lt;a href="https://span.observer/en/ai-sre-reliability/" rel="noopener noreferrer"&gt;AI and reliability: what SREs need to know&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/error-budget-release-gate-dynatrace/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/budget-d-erreur-release-gate-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/budget-d-erreur-release-gate-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>dql</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
    </item>
    <item>
      <title>Microsoft Sentinel alerts in Dynatrace: ingest and enrich</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 13:30:15 +0000</pubDate>
      <link>https://dev.to/spanobserver/microsoft-sentinel-alerts-in-dynatrace-ingest-and-enrich-4573</link>
      <guid>https://dev.to/spanobserver/microsoft-sentinel-alerts-in-dynatrace-ingest-and-enrich-4573</guid>
      <description>&lt;p&gt;It is 3 a.m., Microsoft Sentinel raises an alert on a virtual machine, and the on-call engineer wonders whether it explains the slowdown the application dashboard has shown for twenty minutes. As long as &lt;strong&gt;Microsoft Sentinel alerts&lt;/strong&gt; stay in the SIEM and traces stay in the observability tool, the answer takes two screens and a chat thread. This article starts from that operational decision, whether to link the two or not, and covers what the Dynatrace documentation lets you do.&lt;/p&gt;

&lt;p&gt;The facts come from the &lt;a href="https://docs.dynatrace.com/docs/secure/threat-observability/security-events-ingest/ingest-microsoft-sentinel" rel="noopener noreferrer"&gt;Dynatrace documentation on ingesting Microsoft Sentinel security events&lt;/a&gt; and, on the Microsoft side, from &lt;a href="https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-data-export" rel="noopener noreferrer"&gt;the Log Analytics data export page&lt;/a&gt;. The vendor’s announcement, &lt;a href="https://www.dynatrace.com/news/blog/ingest-and-enrich-microsoft-sentinel-security-alerts-with-dynatrace/" rel="noopener noreferrer"&gt;its blog post&lt;/a&gt;, was the starting point; it contains no query and no prerequisites. The Dynatrace documentation page does not say explicitly whether it applies to SaaS or Managed: it relies on Hub, Grail and Notebooks, so I only cover Dynatrace SaaS. My queries have not been run on a tenant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Microsoft Sentinel alerts: should they meet observability?
&lt;/h2&gt;

&lt;p&gt;This is first a question of diagnosis time (MTTR). A security alert on an Azure resource and an error spike on the service running there may share a cause, or not. To find out without switching tools, both datasets must sit in the same query space.&lt;/p&gt;

&lt;p&gt;That is what the integration offers: Sentinel exports its alerts to Azure Event Hubs, an Azure Function pre-processes them, then sends them to the dedicated security ingest endpoint of OpenPipeline. The data is mapped to the Semantic Dictionary and stored in Grail, in the &lt;code&gt;default_securityevents&lt;/code&gt; bucket. Each alert becomes a &lt;em&gt;Detection finding&lt;/em&gt; event, with &lt;strong&gt;one record per affected object&lt;/strong&gt;, here an Azure resource. An alert touching three machines therefore yields three rows: keep that in mind before comparing your counts with Sentinel’s.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the integration does not do
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  It does not analyse alerts for you: Sentinel stays the SIEM, Dynatrace receives and correlates.&lt;/li&gt;
&lt;li&gt;  The documentation sets no volume quota. Billing follows the «&amp;nbsp;Events powered by Grail&amp;nbsp;» model; watch it from the first days.&lt;/li&gt;
&lt;li&gt;  The vendor post announces future enrichment in the entity experience: I did not verify it, so do not count on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites and setup
&lt;/h2&gt;

&lt;p&gt;Few items are listed, but they matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  the Azure CLI installed on the Microsoft side;&lt;/li&gt;
&lt;li&gt;  a Dynatrace access token with the &lt;code&gt;openpipeline.events_security&lt;/code&gt; scope, stored as a secret;&lt;/li&gt;
&lt;li&gt;  the &lt;code&gt;storage:security.events:read&lt;/code&gt; permission to query the data afterwards.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt; In Dynatrace, open &lt;strong&gt;Hub&lt;/strong&gt;, search for &lt;strong&gt;Microsoft Sentinel&lt;/strong&gt; and click &lt;strong&gt;Install&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;Set up&lt;/strong&gt;, then &lt;strong&gt;Configure new connection&lt;/strong&gt;, and follow the screens.&lt;/li&gt;
&lt;li&gt; On the Azure side, exporting alerts to Event Hubs relies on a data export rule of the Log Analytics workspace, which Microsoft describes in its documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two constraints there deserve a read before sizing: according to Microsoft, an under-sized destination triggers retries for up to 12 hours, which can duplicate some records; and the Basic and Standard Event Hubs tiers are limited to 10 hubs. I did not check whether the Dynatrace wizard creates those resources itself: follow its screens and review what it deploys. If you add permissions, see also &lt;a href="https://span.observer/en/dynatrace-grail-vs-classic-permissions-tags/" rel="noopener noreferrer"&gt;Grail and classic permissions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking that alerts arrive
&lt;/h2&gt;

&lt;p&gt;The documentation offers this verification query, to run in a Notebook:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50ntwj09pllx54i921uk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F50ntwj09pllx54i921uk.png" alt="DQL query fetch security.events filtered on the Microsoft Sentinel provider and the default\_securityevents bucket" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it returns rows, the chain of Event Hubs, Azure Function and OpenPipeline works. If it stays empty, check in order: the token scope, the state of the export rule on the Azure side, then the query timeframe. Sentinel exports only new data: an alert raised before setup will not show up, unless the documentation says otherwise, which I did not find.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sorting by severity and by resource with DQL
&lt;/h2&gt;

&lt;p&gt;Sentinel’s severity (&lt;code&gt;AlertSeverity&lt;/code&gt;) is converted into a risk level and a risk score. According to the documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  High becomes &lt;code&gt;HIGH&lt;/code&gt;, score 8.9;&lt;/li&gt;
&lt;li&gt;  Medium becomes &lt;code&gt;MEDIUM&lt;/code&gt;, score 6.9;&lt;/li&gt;
&lt;li&gt;  Low becomes &lt;code&gt;LOW&lt;/code&gt;, score 3.9;&lt;/li&gt;
&lt;li&gt;  Informational becomes &lt;code&gt;NONE&lt;/code&gt;, score 0.0.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;First reflex: count by level to know whether you face ten alerts or ten thousand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbk6sf5ju2b9aey5tm199.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbk6sf5ju2b9aey5tm199.png" alt="DQL query counting Microsoft Sentinel events by risk level" width="799" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then drill down to the resource. The integration adds &lt;code&gt;azure.*&lt;/code&gt; fields (tenant, subscription, resource group, resource type and name) and, when the alert carries them, &lt;code&gt;actor.*&lt;/code&gt; fields (IP addresses, domain names, country, city).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmx4jdybm6f6k1a0jklr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmx4jdybm6f6k1a0jklr7.png" alt="DQL query ranking Azure resources by number of high-level alerts" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The resource name is the bridge to the rest of your data: if your logs or metrics carry the same name, a join or a cross filter answers the 3 a.m. question. That match depends on your naming conventions, and I do not guarantee it. For other security sources, see &lt;a href="https://span.observer/en/sonarqube-dynatrace-security-findings/" rel="noopener noreferrer"&gt;SonarQube findings in Dynatrace&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating and exploiting
&lt;/h2&gt;

&lt;p&gt;The Dynatrace Microsoft Sentinel app offers dashboard and workflow templates under «&amp;nbsp;Try our templates&amp;nbsp;», and the &lt;strong&gt;Threats &amp;amp; Exploits&lt;/strong&gt; view can be filtered on the Microsoft Sentinel provider. To go further, a workflow can notify a team or open a ticket on a high level. You then need to handle task JavaScript: &lt;a href="https://span.observer/en/dynatrace-workflows-examples-javascript-limits/" rel="noopener noreferrer"&gt;workflow examples and their limits&lt;/a&gt; help you avoid pitfalls. Before passing a free-text field to a third party, apply &lt;a href="https://span.observer/en/openpipeline-data-masking-cost/" rel="noopener noreferrer"&gt;OpenPipeline masking&lt;/a&gt; if alerts carry IP addresses or identifiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Start with a single Sentinel workspace and validate the three queries before widening.&lt;/li&gt;
&lt;li&gt;  Dedicate an Event Hubs namespace to the export, separate from other uses.&lt;/li&gt;
&lt;li&gt;  Compare counts per resource, not per alert: records are per affected object.&lt;/li&gt;
&lt;li&gt;  Limit the Dynatrace token to the ingest scope only.&lt;/li&gt;
&lt;li&gt;  Keep the queries that help triage in a shared Notebook.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Dynatrace replace Microsoft Sentinel?
&lt;/h3&gt;

&lt;p&gt;No. Sentinel detects and manages alerts; Dynatrace receives them to relate them to what it observes. Security analysis stays in the SIEM.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do I see more rows than alerts in Sentinel?
&lt;/h3&gt;

&lt;p&gt;Because Dynatrace creates one record per affected Azure resource. Duplicates from export retries are also possible, which Microsoft flags for its retry mechanism.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does it work on Dynatrace Managed?
&lt;/h3&gt;

&lt;p&gt;I could not verify it: the documentation consulted does not say so, and the data goes to Grail. This article only covers Dynatrace SaaS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Bringing Microsoft Sentinel alerts next to observability replaces no tool: it shortens the path between «&amp;nbsp;an alert fired&amp;nbsp;» and «&amp;nbsp;here is what it means for my services&amp;nbsp;». Install the connector from Hub, validate the verification query, then sort by level and by resource before wiring a workflow.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Independent blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC; Microsoft Sentinel and Azure belong to Microsoft.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/microsoft-sentinel-alerts-dynatrace/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/alertes-microsoft-sentinel-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/alertes-microsoft-sentinel-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>azureeventhubs</category>
      <category>dql</category>
      <category>dynatracesaas</category>
      <category>grail</category>
    </item>
    <item>
      <title>Dynatrace SLO Terraform: one SLO per service, generated at scale</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:30:14 +0000</pubDate>
      <link>https://dev.to/spanobserver/dynatrace-slo-terraform-one-slo-per-service-generated-at-scale-1a06</link>
      <guid>https://dev.to/spanobserver/dynatrace-slo-terraform-one-slo-per-service-generated-at-scale-1a06</guid>
      <description>&lt;p&gt;Three SLOs created by hand is manageable. Eighty services, each with an availability SLO, is toil: repeated clicks, diverging targets and SLOs forgotten for every new service. Managing your Dynatrace SLO Terraform configuration turns this manual work into a versioned list reviewed in a merge request.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: generate one availability SLO per service from a single configuration file, with the Dynatrace Terraform provider and a &lt;code&gt;for_each&lt;/code&gt; loop, then check the result. The content relies on classic SLOs (Settings 2.0), available on &lt;strong&gt;Dynatrace Managed&lt;/strong&gt; and &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt;. One section flags the option of the new Grail SLOs on SaaS.&lt;/p&gt;

&lt;p&gt;Before automating, make sure your indicators make sense: see &lt;a href="https://span.observer/en/how-to-choose-slis-dql/" rel="noopener noreferrer"&gt;how to choose SLIs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The principle
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  A &lt;code&gt;services.yaml&lt;/code&gt; file lists the services and their target.&lt;/li&gt;
&lt;li&gt;  Terraform reads this file with &lt;code&gt;yamldecode&lt;/code&gt; and creates one SLO resource per entry.&lt;/li&gt;
&lt;li&gt;  Adding a service = adding three lines and passing a code review. Removing a line deletes the SLO.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Terraform 1.5 or later.&lt;/li&gt;
&lt;li&gt;  The &lt;code&gt;dynatrace-oss/dynatrace&lt;/code&gt; provider (Terraform registry).&lt;/li&gt;
&lt;li&gt;  An API token with the scopes the &lt;code&gt;dynatrace_slo_v2&lt;/code&gt; resource requires: &lt;code&gt;slo.read&lt;/code&gt;, &lt;code&gt;slo.write&lt;/code&gt;, &lt;code&gt;settings.read&lt;/code&gt; and &lt;code&gt;settings.write&lt;/code&gt;. Check the list in the &lt;a href="https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs" rel="noopener noreferrer"&gt;provider documentation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Services with a common tag, for example &lt;code&gt;service:checkout&lt;/code&gt;, set by your tagging rules (see &lt;a href="https://span.observer/en/dynatrace-management-zones-auto-tagging/" rel="noopener noreferrer"&gt;management zones and tagging&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Generating Dynatrace SLO Terraform resources step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Configure the provider
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;dynatrace&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"dynatrace-oss/dynatrace"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"dynatrace"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The provider reads the URL and token from the environment. Never write them in the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# SaaS&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DYNATRACE_ENV_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://&amp;lt;env-id&amp;gt;.live.dynatrace.com"&lt;/span&gt;
&lt;span class="c"&gt;# Managed&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DYNATRACE_ENV_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://&amp;lt;your-domain&amp;gt;/e/&amp;lt;env-id&amp;gt;"&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;DYNATRACE_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"dt0c01.XXXX"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pin a provider version (&lt;code&gt;version = "~&amp;gt; 1.x"&lt;/code&gt; with the tested version) to avoid an unexpected schema change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Describe the services in a file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# services.yaml
&lt;/span&gt;&lt;span class="na"&gt;checkout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"service:checkout"&lt;/span&gt;
  &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.9&lt;/span&gt;
  &lt;span class="na"&gt;warning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.95&lt;/span&gt;
&lt;span class="na"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"service:cart"&lt;/span&gt;
  &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.5&lt;/span&gt;
  &lt;span class="na"&gt;warning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.7&lt;/span&gt;
&lt;span class="na"&gt;search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"service:search"&lt;/span&gt;
  &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.5&lt;/span&gt;
  &lt;span class="na"&gt;warning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;99.7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file becomes the catalogue of your objectives. The product owner can review it without knowing Terraform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Write the resource with for_each
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;locals&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;services&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;yamldecode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"${path.module}/services.yaml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"dynatrace_slo_v2"&lt;/span&gt; &lt;span class="s2"&gt;"availability"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;for_each&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;services&lt;/span&gt;

  &lt;span class="n"&gt;name&lt;/span&gt;               &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Availability ${each.key}"&lt;/span&gt;
  &lt;span class="n"&gt;enabled&lt;/span&gt;            &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="n"&gt;custom_description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Server requests without error / requests. Managed by Terraform."&lt;/span&gt;
  &lt;span class="n"&gt;evaluation_type&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"AGGREGATE"&lt;/span&gt;
  &lt;span class="n"&gt;evaluation_window&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"-30d"&lt;/span&gt;
  &lt;span class="n"&gt;filter&lt;/span&gt;             &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"type(\"SERVICE\"),tag(\"${each.value.tag}\")"&lt;/span&gt;
  &lt;span class="n"&gt;metric_name&lt;/span&gt;        &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"availability_${replace(each.key, "&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="s2"&gt;", "&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="s2"&gt;")}"&lt;/span&gt;
  &lt;span class="n"&gt;metric_expression&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())"&lt;/span&gt;
  &lt;span class="n"&gt;target_success&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;
  &lt;span class="n"&gt;target_warning&lt;/span&gt;     &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;warning&lt;/span&gt;

  &lt;span class="n"&gt;error_budget_burn_rate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;burn_rate_visualization_enabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="n"&gt;fast_burn_threshold&lt;/span&gt;             &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;14.4&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;for_each = local.services&lt;/code&gt;: one instance per YAML key, addressed by name (&lt;code&gt;dynatrace_slo_v2.availability["checkout"]&lt;/code&gt;). Unlike &lt;code&gt;count&lt;/code&gt;, removing a service does not shift the others.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;filter&lt;/code&gt;: the entity selector restricts the SLO to services carrying the tag. Inner quotes are escaped.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;metric_name&lt;/code&gt;: must be unique; it is used to expose the SLO as a metric.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;fast_burn_threshold&lt;/code&gt;: aligned with the fast alert described in &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Attribute names depend on the provider version. The safest route: create an SLO by hand, export it with the provider’s export tool, then compare with your code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Plan and apply
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
terraform plan -out slo.plan
terraform apply slo.plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The plan must announce exactly one creation per service in the YAML. Review it in a merge request before the apply, ideally from a CI pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about the new Grail SLOs on SaaS?
&lt;/h3&gt;

&lt;p&gt;On SaaS, SLOs from the Service-Level Objectives app (based on DQL) are managed by another provider resource, separate from &lt;code&gt;dynatrace_slo_v2&lt;/code&gt;. Its name and attributes have changed between versions: check the provider documentation before using it. The &lt;code&gt;for_each&lt;/code&gt; pattern stays the same; only the SLI definition changes, with a DQL query like those in &lt;a href="https://span.observer/en/opentelemetry-slo-dynatrace-dql/" rel="noopener noreferrer"&gt;creating an OpenTelemetry SLO&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Add a latency SLO to the same catalogue
&lt;/h3&gt;

&lt;p&gt;The same pattern extends to a second SLI type. Add an optional &lt;code&gt;latency_ms&lt;/code&gt; field in the YAML, then filter the map so the latency SLO is only created for services that declare it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="n"&gt;locals&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;latency_services&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;svc&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;services&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;svc&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;try&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;svc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latency_ms&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A second &lt;code&gt;dynatrace_slo_v2&lt;/code&gt; resource with &lt;code&gt;for_each = local.latency_services&lt;/code&gt; then reuses the step 3 structure, with a latency metric expression suited to your version (check the available response time metrics in the documentation). The catalogue stays single: one service, one entry, all its objectives.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check that it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;code&gt;terraform state list&lt;/code&gt; shows one resource per service: &lt;code&gt;dynatrace_slo_v2.availability["cart"]&lt;/code&gt;, and so on.&lt;/li&gt;
&lt;li&gt; A second &lt;code&gt;terraform plan&lt;/code&gt; reports «&amp;nbsp;No changes&amp;nbsp;». If not, an attribute is normalised by the API: align your code with the returned value.&lt;/li&gt;
&lt;li&gt; In the &lt;strong&gt;Service-level objectives&lt;/strong&gt; screen, each SLO shows a status and an error budget, not «&amp;nbsp;no data&amp;nbsp;». A «&amp;nbsp;no data&amp;nbsp;» almost always signals a missing or misspelt tag in &lt;code&gt;filter&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Store the Terraform state in a remote backend with locking, never on a laptop.&lt;/li&gt;
&lt;li&gt;  Forbid manual changes to managed SLOs: the «&amp;nbsp;Managed by Terraform&amp;nbsp;» note in the description helps the team.&lt;/li&gt;
&lt;li&gt;  Run &lt;code&gt;terraform plan&lt;/code&gt; every night in CI to detect drift.&lt;/li&gt;
&lt;li&gt;  Keep targets in the YAML, not in the HCL: the discussion is about objectives, not code.&lt;/li&gt;
&lt;li&gt;  For the rest of the automation, see &lt;a href="https://span.observer/en/dynatrace-managed-cluster-api-automation/" rel="noopener noreferrer"&gt;automating with the cluster API&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I import SLOs already created by hand?
&lt;/h3&gt;

&lt;p&gt;Yes, with an &lt;code&gt;import&lt;/code&gt; block (Terraform 1.5+) or &lt;code&gt;terraform import&lt;/code&gt;, using the setting’s identifier. Add the entry to the YAML first so the address exists.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I generate the list of services automatically?
&lt;/h3&gt;

&lt;p&gt;The provider offers an entities data source that lists services. It is handy, but one SLO per service without human review quickly produces SLOs without an owner. Prefer a reviewed YAML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does this code work on an offline Managed cluster?
&lt;/h3&gt;

&lt;p&gt;Yes, if the machine running Terraform can reach the cluster API and has the provider in a local mirror.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;One YAML file, one resource and a &lt;code&gt;for_each&lt;/code&gt; loop are enough to give every service an SLO, with code review and history. The toil disappears, and each new service arrives with its objective from day one.&lt;/p&gt;

&lt;p&gt;Recommended next step: connect this repository to your CI pipeline, with an automatic plan on each merge request and a manual apply after approval. Start with three pilot services, check that the SLOs show real data, then open the catalogue to the other teams.&lt;/p&gt;

&lt;p&gt;Keep the YAML catalogue short and readable: it is the document product and SRE will discuss each quarter.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/dynatrace-slo-terraform/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/slo-dynatrace-terraform/" rel="noopener noreferrer"&gt;https://span.observer/fr/slo-dynatrace-terraform/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>automation</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
      <category>errorbudget</category>
    </item>
    <item>
      <title>AWS DevOps Agent Dynatrace: what to let investigate at night</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 09:30:16 +0000</pubDate>
      <link>https://dev.to/spanobserver/aws-devops-agent-dynatrace-what-to-let-investigate-at-night-1kbm</link>
      <guid>https://dev.to/spanobserver/aws-devops-agent-dynatrace-what-to-let-investigate-at-night-1kbm</guid>
      <description>&lt;p&gt;It is 3 a.m., a slowness alert hits the payment API, and the on-call engineer opens three consoles before understanding anything. Wiring up &lt;strong&gt;AWS DevOps Agent Dynatrace&lt;/strong&gt; targets that exact moment: hand the first round of investigation to an agent, using the context Dynatrace has already gathered. One operating decision remains before any click: what do you let the agent read, and what do you forbid it to execute?&lt;/p&gt;

&lt;p&gt;This article starts from that decision. The technical facts come from the &lt;a href="https://docs.aws.amazon.com/devopsagent/latest/userguide/connecting-telemetry-sources-connecting-dynatrace.html" rel="noopener noreferrer"&gt;AWS DevOps Agent documentation&lt;/a&gt; on Dynatrace and, for framing, from the &lt;a href="https://www.dynatrace.com/news/blog/integration-with-aws-devops-agent-autonomous-investigations-powered-by-production-context/" rel="noopener noreferrer"&gt;vendor’s blog post&lt;/a&gt;. I ran nothing on an AWS account or a tenant for this article.&lt;/p&gt;

&lt;p&gt;This content applies to Dynatrace SaaS only. Dynatrace Managed is not supported, as explained below.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the AWS DevOps Agent Dynatrace integration changes on call
&lt;/h2&gt;

&lt;p&gt;Without the integration, the AWS agent investigates with what it knows of your AWS resources. With it, the agent also uses what Dynatrace knows: entities, relationships, telemetry. The AWS documentation describes a two-way link in four parts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Topology&lt;/strong&gt;: the agent enriches its Agent Space topology with entities and relationships from your Dynatrace environment.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Triggering&lt;/strong&gt;: Dynatrace Workflows can start an investigation from a Problem.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Telemetry access&lt;/strong&gt;: during the investigation, the agent queries Dynatrace through a Model Context Protocol (MCP) server that AWS hosts.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Feedback&lt;/strong&gt;: the agent publishes its findings, root cause analyses and mitigation plans in the Dynatrace interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, on-call keeps its usual screen. It sees the investigation progress there, even when the investigation fails or ends empty: AWS states that the agent sends an event at every status change.&lt;/p&gt;

&lt;p&gt;This is not an agent that fixes things alone. The vendor’s post says a proposed action waits for human approval before it runs. To compare this approach with other agents, see &lt;a href="https://span.observer/en/devin-oncall-dynatrace-guardrails/" rel="noopener noreferrer"&gt;our study of Devin on call and its guardrails&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prerequisites that decide it before you start
&lt;/h2&gt;

&lt;p&gt;Three conditions settle feasibility. Check them before opening an internal ticket.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Dynatrace SaaS.&lt;/strong&gt; The integration relies on Workflows, AppEngine apps (including the SRE Agents app) and OAuth clients. The AWS documentation says Managed is not supported and that Dynatrace has no plan to bring these features to it. A team on Managed must migrate first.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;DPS licensing.&lt;/strong&gt; To receive status updates in Dynatrace, the environment must use the Dynatrace Platform Subscription model. AWS explains that the &lt;code&gt;/platform/ingest/v1/events&lt;/code&gt; endpoint exists only under that model.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;A properly bound OAuth client.&lt;/strong&gt; The client’s permissions are not enough: its subject user must also receive them through policies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the Dynatrace side, reread &lt;a href="https://span.observer/en/dynatrace-saas-mcp-server-setup/" rel="noopener noreferrer"&gt;the Dynatrace SaaS MCP server setup&lt;/a&gt;: the reasoning about scopes is the same, with one difference: here the MCP server is hosted by AWS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting the agent in three steps
&lt;/h2&gt;

&lt;p&gt;The AWS documentation splits the setup into three stages: connect, enable, configure on the Dynatrace side.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: connect the account
&lt;/h3&gt;

&lt;p&gt;In the AWS DevOps Agent console, the Capability Providers page lists Dynatrace under Telemetry. You create an OAuth client in Dynatrace, then enter its name, ID, secret and Account URN. The client asks for read rights on Grail storage, plus the right to write events.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7etbc6y7ldcfsby72npg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7etbc6y7ldcfsby72npg.png" alt="List of the thirteen OAuth client permissions requested by AWS DevOps Agent, from storage:bizevents:read to openpipeline:events:ingest" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note the last line, &lt;code&gt;openpipeline:events:ingest&lt;/code&gt;. It lets the agent send its status back. Also bind the OpenPipeline Ingest policy to the service user’s group. Without it, Dynatrace rejects every event with a 403 error, and AWS gives the exact response body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwulv020v53pqmdmgtv6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwulv020v53pqmdmgtv6p.png" alt="Body of the 403 error response returned by Dynatrace when the openpipeline:events:ingest permission is missing" width="798" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: enable it in an Agent Space
&lt;/h3&gt;

&lt;p&gt;In the chosen Agent Space, Capabilities tab, Telemetry section, you add the Dynatrace registration. You give the environment ID and, optionally, IDs of important entities (services, applications) to guide discovery. The console then provides a webhook URL and a webhook secret: keep them for the next step.&lt;/p&gt;

&lt;p&gt;One Agent Space can use several registrations and several environments. That helps to separate, for example, production from staging.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: finish on the Dynatrace side
&lt;/h3&gt;

&lt;p&gt;AWS says you finish the setup in the Dynatrace SRE Agents app, «&amp;nbsp;in two clicks&amp;nbsp;», without building a workflow by hand. I could not read a Dynatrace documentation page describing that app, so the exact screens are for you to check.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Dynatrace sends to the agent
&lt;/h2&gt;

&lt;p&gt;Two event schemas travel through the webhook. The first, the incident event, triggers the investigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzw5gmzpx9tafqzloflf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzw5gmzpx9tafqzloflf8.png" alt="Schema of the incident event sent by webhook to AWS DevOps Agent, with event.status, event.category and affected\_entity\_ids" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;event.category&lt;/code&gt; field takes one of AVAILABILITY, ERROR, SLOWDOWN, RESOURCE_CONTENTION, CUSTOM_ALERT, MONITORING_UNAVAILABLE and INFO. The &lt;code&gt;event.status&lt;/code&gt; field is ACTIVE or CLOSED. The second schema, the mitigation event, asks for a report of next steps for a given investigation. It carries a &lt;code&gt;task_id&lt;/code&gt;, a &lt;code&gt;task_version&lt;/code&gt; and the type &lt;code&gt;mitigation_request&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This split matters in practice: the investigation and the request for a remedy are two separate moments. You can therefore trigger investigations automatically and keep the mitigation request under human control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good practice for an investigation agent in production
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Limit scopes to what is needed and use one OAuth client per environment.&lt;/li&gt;
&lt;li&gt;  Trigger first on a low-risk Problem category, such as SLOWDOWN, before widening.&lt;/li&gt;
&lt;li&gt;  Keep human approval for any proposed action: the vendor’s material presents it as a control point.&lt;/li&gt;
&lt;li&gt;  Enable log delivery for the Agent Space: AWS recommends it when the SRE Agents app shows no events for an investigation.&lt;/li&gt;
&lt;li&gt;  Measure before claiming a gain. The vendor’s post cites up to a 70% reduction in mean time to resolution for joint customers: that figure comes from the vendor and I have not verified it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To set expectations for this kind of agent, also read &lt;a href="https://span.observer/en/autonomous-sre-agents-dynatrace-announced-vs-delivered/" rel="noopener noreferrer"&gt;the gap between announced and delivered SRE agents&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does AWS DevOps Agent work with Dynatrace Managed?
&lt;/h3&gt;

&lt;p&gt;No, according to the AWS documentation: the integration requires Dynatrace SaaS. Workflows, the SRE Agents app and OAuth clients do not exist on Managed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Must I declare entity IDs?
&lt;/h3&gt;

&lt;p&gt;No, the AWS documentation says you can remove them if unsure. They help the agent spot your most important resources, such as services or applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I remove the integration?
&lt;/h3&gt;

&lt;p&gt;In two steps, per AWS: remove Dynatrace from each Agent Space, then deregister it from the account once the Agent Space count is zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Handing the first round of investigation to an agent is decided like a production change: read scope, limited write rights, human sign-off. The prerequisites (SaaS, DPS, OAuth bound to the user) take an hour to check. The rest you measure on your own incidents. To trigger actions from Problems, see also &lt;a href="https://span.observer/en/dynatrace-workflow-jira-servicenow/" rel="noopener noreferrer"&gt;Dynatrace workflows to Jira and ServiceNow&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Independent blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC; AWS and AWS DevOps Agent are trademarks of Amazon Web Services.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/aws-devops-agent-dynatrace-integration/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/aws-devops-agent-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/aws-devops-agent-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>awsdevopsagent</category>
      <category>dynatracesaas</category>
      <category>mcp</category>
      <category>oauth</category>
    </item>
    <item>
      <title>How to choose SLIs: a practical method, from DQL queries to objectives</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Thu, 26 Nov 2026 07:30:17 +0000</pubDate>
      <link>https://dev.to/spanobserver/how-to-choose-slis-a-practical-method-from-dql-queries-to-objectives-6om</link>
      <guid>https://dev.to/spanobserver/how-to-choose-slis-a-practical-method-from-dql-queries-to-objectives-6om</guid>
      <description>&lt;p&gt;A team creates twenty SLOs in one afternoon, one per available metric. Three months later nobody looks at them: they are all green while users complain. The problem is not the tool, it is knowing how to choose SLIs.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: apply a five-step method to choose SLIs from the user journey, write them in DQL, measure their history and derive realistic objectives. The queries target &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; (Grail); the approach also applies to &lt;strong&gt;Dynatrace Managed&lt;/strong&gt;, with metric expressions instead of DQL.&lt;/p&gt;

&lt;p&gt;For the general SRE context, see &lt;a href="https://span.observer/en/ai-sre-reliability/" rel="noopener noreferrer"&gt;AI and reliability: what SREs need to know&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes a good SLI
&lt;/h2&gt;

&lt;p&gt;A good SLI ticks three boxes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  it reflects what the user experiences (a page that does not load), not the state of a machine (a CPU at 90%);&lt;/li&gt;
&lt;li&gt;  it is expressed as a ratio: good events / valid events, between 0 and 100%;&lt;/li&gt;
&lt;li&gt;  it moves when the service degrades, and only then.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CPU, memory or pod count remain useful for diagnosis. They are not SLIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  SaaS: access to Notebooks and read access to spans and service metrics in Grail.&lt;/li&gt;
&lt;li&gt;  Managed: access to Data Explorer and the &lt;code&gt;builtin:service.*&lt;/code&gt; metrics.&lt;/li&gt;
&lt;li&gt;  At least 14 days of data on the service, to cover two weekly cycles.&lt;/li&gt;
&lt;li&gt;  One hour with the product owner: the method starts with a conversation, not a query.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to choose SLIs in 5 steps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — List the critical journeys
&lt;/h3&gt;

&lt;p&gt;Ask: «&amp;nbsp;If this action fails, who calls support?&amp;nbsp;» Keep three to five journeys at most. Example for an online shop:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Journey&lt;/th&gt;
&lt;th&gt;Entry service&lt;/th&gt;
&lt;th&gt;What the user expects&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search for a product&lt;/td&gt;
&lt;td&gt;search&lt;/td&gt;
&lt;td&gt;Fast results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add to basket&lt;/td&gt;
&lt;td&gt;cart&lt;/td&gt;
&lt;td&gt;An action that succeeds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pay&lt;/td&gt;
&lt;td&gt;checkout&lt;/td&gt;
&lt;td&gt;A confirmed payment, without error&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Step 2 — Match an SLI type to each journey
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Availability&lt;/strong&gt;: requests without error / valid requests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Latency&lt;/strong&gt;: requests under a threshold / valid requests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Quality&lt;/strong&gt;: complete responses (no degraded result) / responses.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Freshness&lt;/strong&gt; (asynchronous processing): data updated less than N minutes ago / data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For search: latency. For the basket: availability. For payment: availability and latency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Define valid and good events precisely
&lt;/h3&gt;

&lt;p&gt;This is the step most often rushed. Write it down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;valid&lt;/strong&gt;: server request on the payment endpoint, excluding health checks and synthetic traffic;&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;good&lt;/strong&gt;: response without a server error (a 4xx error caused by the client remains «&amp;nbsp;good&amp;nbsp;» on the service side).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This definition decides what consumes the error budget. Have it validated by the product team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Measure the history in DQL
&lt;/h3&gt;

&lt;p&gt;Availability per day over 14 days, from spans:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 14d
| filter service.name == "checkout" and span.kind == "server"
| filterOut contains(url.path, "/health")
| makeTimeseries {
    total = count(),
    errors = countIf(span.status_code == "error")
  }, interval: 1d
| fieldsAdd availability = 100 * (total[] - errors[]) / total[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Latency distribution, to choose the threshold:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 14d
| filter service.name == "search" and span.kind == "server"
| summarize p50 = percentile(duration, 50),
            p90 = percentile(duration, 90),
            p99 = percentile(duration, 99)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: &lt;code&gt;filterOut&lt;/code&gt; removes health checks from the denominator. The &lt;code&gt;url.path&lt;/code&gt; field depends on your instrumentation; adapt it. If your services are instrumented by OneAgent, the &lt;code&gt;dt.service.request.count&lt;/code&gt; metric and its counterpart &lt;code&gt;dt.service.request.failure_count&lt;/code&gt; give the same result faster (names to check in the &lt;a href="https://docs.dynatrace.com/docs/analyze-explore-automate/dashboards-and-notebooks" rel="noopener noreferrer"&gt;Dynatrace documentation&lt;/a&gt;). Over 14 days, a query on spans can be costly: run it once, not in a loop.&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;Managed&lt;/strong&gt;, open Data Explorer with &lt;code&gt;builtin:service.errors.server.rate&lt;/code&gt; and &lt;code&gt;builtin:service.response.time&lt;/code&gt; (percentiles), split by day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Derive realistic objectives
&lt;/h3&gt;

&lt;p&gt;Simple rule: start from what the service already does, slightly below, then tighten if users demand it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Measured availability between 99.82% and 99.97% per day: a 99.5% objective over 28 days is achievable and leaves a usable budget.&lt;/li&gt;
&lt;li&gt;  Latency p90 at 320 ms, p99 at 1.1 s: a 500 ms threshold with a 95% objective reflects everyday experience without alerting on the tail of the distribution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 100% objective forbids any change. An objective above current performance is in permanent alert. Both are useless.&lt;/p&gt;

&lt;h3&gt;
  
  
  The infrastructure SLI trap
&lt;/h3&gt;

&lt;p&gt;A Kubernetes node can fail without any user noticing, thanks to replicas. Conversely, a saturated database can slow down every payment while all pods are «&amp;nbsp;healthy&amp;nbsp;». So keep infrastructure signals in your dashboards and diagnostic alerts, and reserve SLIs for user-facing signals. This separation reduces on-call noise and makes the error budget credible to product.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check that it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Replay a past incident: on that day, the SLI must drop clearly. If it stays flat, the SLI does not measure what users experience.&lt;/li&gt;
&lt;li&gt; Check that a quiet day stays above the objective: otherwise, the objective is too high.&lt;/li&gt;
&lt;li&gt; Create the SLO and look at the remaining error budget over 28 days: it must be positive without sitting at 100% all the time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Creating the SLOs themselves is covered in &lt;a href="https://span.observer/en/opentelemetry-slo-dynatrace-dql/" rel="noopener noreferrer"&gt;creating an OpenTelemetry SLO in DQL&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Three to five SLIs per service at most: beyond that, nobody reads them.&lt;/li&gt;
&lt;li&gt;  Measure as close to the user as possible (load balancer, entry service, RUM) rather than at the database.&lt;/li&gt;
&lt;li&gt;  Document each SLI definition next to its query, with the review date.&lt;/li&gt;
&lt;li&gt;  Review objectives every quarter with product, blamelessly: a missed SLO is data, not a fault.&lt;/li&gt;
&lt;li&gt;  Then wire up &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts&lt;/a&gt; to be warned before the budget runs out.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Do I need a different SLI per endpoint?
&lt;/h3&gt;

&lt;p&gt;No. Group the endpoints of the same journey. Only isolate a critical endpoint whose behaviour differs strongly (payment, for example).&lt;/p&gt;

&lt;h3&gt;
  
  
  Percentile or ratio for latency?
&lt;/h3&gt;

&lt;p&gt;The «&amp;nbsp;requests under the threshold&amp;nbsp;» ratio accumulates cleanly over a window and gives an error budget. The percentile remains useful to choose the threshold, in step 4.&lt;/p&gt;

&lt;h3&gt;
  
  
  What if I do not have 14 days of history?
&lt;/h3&gt;

&lt;p&gt;Start with a cautious objective, mark it «&amp;nbsp;provisional&amp;nbsp;» and revise it after two weeks of data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Choosing SLIs means starting from the user, defining good events precisely, measuring the history, then setting an achievable objective. An afternoon of method beats twenty SLOs that nobody reads.&lt;/p&gt;

&lt;p&gt;Recommended next step: book the hour with your product owner this week, list the three most critical journeys, and run the step 4 queries on them. You will have defensible SLIs and objectives before the next planning session.&lt;/p&gt;

&lt;p&gt;Keep each SLI definition, its query and its review date in the same place, so that the next person on call understands what the number means without asking.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/how-to-choose-slis-dql/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/choisir-ses-sli-dql/" rel="noopener noreferrer"&gt;https://span.observer/fr/choisir-ses-sli-dql/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dql</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
      <category>errorbudget</category>
    </item>
    <item>
      <title>OpenTelemetry SLO in Dynatrace: availability and latency in DQL</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Wed, 25 Nov 2026 21:30:16 +0000</pubDate>
      <link>https://dev.to/spanobserver/opentelemetry-slo-in-dynatrace-availability-and-latency-in-dql-3n7n</link>
      <guid>https://dev.to/spanobserver/opentelemetry-slo-in-dynatrace-availability-and-latency-in-dql-3n7n</guid>
      <description>&lt;p&gt;Your services send their traces over OTLP, but your reliability targets remain numbers on a wiki page. Without an OpenTelemetry SLO wired to that data, nobody knows whether the service keeps its promise, or how much error budget is left before freezing releases.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: create two SLOs in Dynatrace from OpenTelemetry spans, one for availability and one for latency, written in DQL, then check their values. The content targets &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; (Grail, Service-Level Objectives app). One section gives the alternative for &lt;strong&gt;Dynatrace Managed&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you are still unsure which indicators to measure, first read &lt;a href="https://span.observer/en/how-to-choose-slis-dql/" rel="noopener noreferrer"&gt;how to choose SLIs: the practical method&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we measure
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Availability&lt;/strong&gt;: share of server requests that are not in error. Target: 99.5% over 28 days.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Latency&lt;/strong&gt;: share of server requests served in under 500 ms. Target: 95% over 28 days.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both SLIs are «&amp;nbsp;good events / valid events&amp;nbsp;» ratios. This format makes the error budget readable: 0.5% of requests may fail over the window.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  SaaS on the Grail platform, with the &lt;strong&gt;Service-Level Objectives&lt;/strong&gt; app and permissions to read spans and write SLOs (exact list in the documentation).&lt;/li&gt;
&lt;li&gt;  OpenTelemetry spans already in Grail, with the &lt;code&gt;service.name&lt;/code&gt; attribute. If nothing arrives, follow the &lt;a href="https://span.observer/en/opentelemetry-traces-not-showing-dynatrace/" rel="noopener noreferrer"&gt;OpenTelemetry traces not showing&lt;/a&gt; checklist.&lt;/li&gt;
&lt;li&gt;  Server spans (&lt;code&gt;span.kind == "server"&lt;/code&gt;) with a status set by the instrumentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating an OpenTelemetry SLO step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Explore the spans in a Notebook
&lt;/h3&gt;

&lt;p&gt;Before writing the SLI, check the available fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 1h
| filter service.name == "checkout" and span.kind == "server"
| summarize total = count(),
            errors = countIf(span.status_code == "error"),
            p95 = percentile(duration, 95)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: &lt;code&gt;span.kind == "server"&lt;/code&gt; keeps only incoming requests, not outgoing calls. &lt;code&gt;span.status_code&lt;/code&gt; carries the OpenTelemetry status. If your HTTP spans are not marked as errors on 5xx responses, filter on &lt;code&gt;http.response.status_code &amp;gt;= 500&lt;/code&gt; instead. The exact field names in Grail are described in the &lt;a href="https://docs.dynatrace.com/docs/semantic-dictionary" rel="noopener noreferrer"&gt;Semantic Dictionary documentation&lt;/a&gt;: check them before going further.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Write the availability SLI
&lt;/h3&gt;

&lt;p&gt;The SLO app expects a time series that returns a percentage. So we turn the spans into series with &lt;code&gt;makeTimeseries&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans
| filter service.name == "checkout" and span.kind == "server"
| makeTimeseries {
    total = count(),
    errors = countIf(span.status_code == "error")
  }, interval: 1m
| fieldsAdd sli = 100 * (total[] - errors[]) / total[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;strong&gt;Service-Level Objectives&lt;/strong&gt; app, create an SLO with a custom SLI, paste the query, then set the target to 99.5 and the window to 28 days. The expected shape (result field name, query timeframe handled by the app) may change: compare with a template offered by the app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Write the latency SLI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans
| filter service.name == "checkout" and span.kind == "server"
| makeTimeseries {
    total = count(),
    fast = countIf(duration &amp;lt; 500ms)
  }, interval: 1m
| fieldsAdd sli = 100 * fast[] / total[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We measure a ratio of fast requests rather than a percentile. A percentile does not add up over 28 days; a ratio does. Target: 95. Create this second SLO the same way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Keep query cost under control
&lt;/h3&gt;

&lt;p&gt;An SLO re-evaluates its query regularly. Querying every span of a high-traffic service is expensive in Grail reads. Two leaner options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  extract a metric from the spans with OpenPipeline, then write the SLI with &lt;code&gt;timeseries&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;  use the OpenTelemetry metric &lt;code&gt;http.server.request.duration&lt;/code&gt; (histogram) if your SDK exports it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example with an extracted metric (name to adapt to your pipeline):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timeseries {
    total = sum(otel.checkout.requests),
    errors = sum(otel.checkout.requests, filter: { status == "error" })
  }
| fieldsAdd sli = 100 * (total[] - errors[]) / total[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See &lt;a href="https://span.observer/en/histogram-metrics-openpipeline-slo/" rel="noopener noreferrer"&gt;metrics and histograms with OpenPipeline&lt;/a&gt; for the extraction.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about Dynatrace Managed?
&lt;/h3&gt;

&lt;p&gt;Managed has neither Grail nor DQL. Ingested OpenTelemetry spans become service requests there: a classic SLO can then rely on a metric expression, for example &lt;code&gt;(100)*(builtin:service.errors.server.successCount:splitBy())/(builtin:service.requestCount.server:splitBy())&lt;/code&gt;, filtered on the service. Check in the documentation for your version that the OpenTelemetry service does expose these metrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Read the error budget
&lt;/h3&gt;

&lt;p&gt;With 99.5% over 28 days and 2 million requests in the window, the budget allows 10,000 failed requests. If 4,000 have already failed halfway through the window, 40% of the budget is consumed: the pace is healthy. If 8,000 have failed in one week, the team slows down releases and prioritises reliability. This rule, written in advance and agreed with product, avoids debates during the incident.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check that it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Run each SLI query in a Notebook over 24 hours: the &lt;code&gt;sli&lt;/code&gt; curve must stay between 0 and 100, with no gaps.&lt;/li&gt;
&lt;li&gt; In the SLO app, the status and remaining error budget are displayed for both SLOs.&lt;/li&gt;
&lt;li&gt; Generate errors in a test environment (for example an endpoint that returns 500): the availability SLI must drop within minutes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Filter on valid requests: exclude health checks and synthetic traffic from the denominator.&lt;/li&gt;
&lt;li&gt;  Keep the latency threshold aligned with user experience, not with current performance.&lt;/li&gt;
&lt;li&gt;  Normalise &lt;code&gt;service.name&lt;/code&gt; in the Collector so the SLO survives a deployment rename.&lt;/li&gt;
&lt;li&gt;  Add burn rate alerts at creation time: see &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;SLO burn rate alerts in Dynatrace&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  To roll these SLOs out to all your services, version them: see &lt;a href="https://span.observer/en/dynatrace-slo-terraform/" rel="noopener noreferrer"&gt;generating Dynatrace SLOs with Terraform&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Do I need OpenTelemetry metrics, or are spans enough?
&lt;/h3&gt;

&lt;p&gt;Spans are enough to start. For a high-traffic service, a derived metric is cheaper and faster to evaluate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 28 days rather than a month?
&lt;/h3&gt;

&lt;p&gt;A 28-day window always contains four full weeks: each weekday weighs the same, which makes SLOs comparable from one period to the next.&lt;/p&gt;

&lt;h3&gt;
  
  
  What if the SLI goes above 100 or becomes empty?
&lt;/h3&gt;

&lt;p&gt;An empty SLI signals no traffic in the interval (division by zero). An SLI above 100 signals a badly filtered numerator. Go back to step 1 and compare the counters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Two DQL queries are enough to go from OpenTelemetry traces to availability and latency SLOs. Start with one critical service, validate the numbers in a Notebook, then add the burn rate alerts.&lt;/p&gt;

&lt;p&gt;Recommended next step: present these two SLOs at a team review, together with the release freeze rule tied to the error budget. An SLO that product shares and understands is worth more than a perfect SLO that only on-call looks at. Then review the thresholds after a month of real data.&lt;/p&gt;

&lt;p&gt;Keep the Notebook with your exploration queries: it becomes the reference when someone asks why the SLI dropped, and it shortens the next investigation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/opentelemetry-slo-dynatrace-dql/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/slo-opentelemetry-dynatrace-dql/" rel="noopener noreferrer"&gt;https://span.observer/fr/slo-opentelemetry-dynatrace-dql/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>dql</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
      <category>errorbudget</category>
    </item>
    <item>
      <title>OpenTelemetry traces not showing in Dynatrace: an 8-step OTLP troubleshooting checklist</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Wed, 25 Nov 2026 19:30:18 +0000</pubDate>
      <link>https://dev.to/spanobserver/opentelemetry-traces-not-showing-in-dynatrace-an-8-step-otlp-troubleshooting-checklist-4dkf</link>
      <guid>https://dev.to/spanobserver/opentelemetry-traces-not-showing-in-dynatrace-an-8-step-otlp-troubleshooting-checklist-4dkf</guid>
      <description>&lt;p&gt;You have instrumented a service, the Collector is running, and yet with OpenTelemetry traces not showing in Dynatrace the Distributed Tracing screen stays empty. Meanwhile the ongoing incident has no context, MTTR climbs and the team starts doubting the whole telemetry chain.&lt;/p&gt;

&lt;p&gt;Goal of this tutorial: follow an 8-step OTLP troubleshooting checklist, from the application to Grail, and isolate the link that drops spans in under 30 minutes. The content applies to &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; and &lt;strong&gt;Dynatrace Managed&lt;/strong&gt;; URL differences are flagged each time.&lt;/p&gt;

&lt;p&gt;If you do not have a Collector yet, start with &lt;a href="https://span.observer/en/opentelemetry-collector-dynatrace-setup/" rel="noopener noreferrer"&gt;installing and configuring the OpenTelemetry Collector for Dynatrace&lt;/a&gt;, then come back here.&lt;/p&gt;

&lt;h2&gt;
  
  
  The principle: walk up the chain one link at a time
&lt;/h2&gt;

&lt;p&gt;A trace crosses four links: the SDK in the application, the OTLP export, the Collector (if there is one), then the Dynatrace OTLP endpoint. Each step below tests a single link. Do not skip steps: the most frequent cause is often the most mundane (wrong URL path, token without the right scope).&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  Read access to the application and Collector logs.&lt;/li&gt;
&lt;li&gt;  A Dynatrace API token with the &lt;code&gt;openTelemetryTrace.ingest&lt;/code&gt; scope (Ingest OpenTelemetry traces).&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;curl&lt;/code&gt; on a machine in the same network as the application.&lt;/li&gt;
&lt;li&gt;  SaaS: access to Notebooks or the Distributed Tracing app. Managed: access to the environment’s Distributed traces screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  OpenTelemetry traces not showing: the 8-step checklist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 — Check that the SDK produces spans
&lt;/h3&gt;

&lt;p&gt;Enable a console exporter next to the OTLP exporter. With auto-instrumentation (Java, Python, Node.js), the standard environment variables are enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_SERVICE_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;checkout
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_TRACES_EXPORTER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;otlp,console
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_TRACES_SAMPLER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;always_on
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no span appears on standard output, the problem is in the application: agent not loaded, library not instrumented or sampler set to &lt;code&gt;always_off&lt;/code&gt;. Support for the &lt;code&gt;console&lt;/code&gt; value depends on the language: check your SDK documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Check the protocol and port
&lt;/h3&gt;

&lt;p&gt;The Dynatrace OTLP endpoint accepts OTLP over HTTP (protobuf). An SDK set to gRPC (port 4317) sending directly to Dynatrace will not get through. Set the protocol explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_PROTOCOL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http/protobuf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the application sends to a local Collector, gRPC on 4317 or HTTP on 4318 both work, as long as the matching receiver is enabled in the Collector.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Check the exact URL
&lt;/h3&gt;

&lt;p&gt;This is cause number one. The generic &lt;code&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/code&gt; variable takes the base, and the SDK appends &lt;code&gt;/v1/traces&lt;/code&gt;. The specific &lt;code&gt;OTEL_EXPORTER_OTLP_TRACES_ENDPOINT&lt;/code&gt; variable takes the full URL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# SaaS&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;env-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.live.dynatrace.com/api/v2/otlp
&lt;span class="c"&gt;# Managed&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;your-domain&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/e/&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;env-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/api/v2/otlp
&lt;span class="c"&gt;# Environment ActiveGate&lt;/span&gt;
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_ENDPOINT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;activegate&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;:9999/e/&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;env-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/api/v2/otlp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Classic mistake: putting &lt;code&gt;/api/v2/otlp/v1/traces&lt;/code&gt; in the generic variable, which gives &lt;code&gt;/v1/traces/v1/traces&lt;/code&gt; and a 404 response. Check the exact format in the &lt;a href="https://docs.dynatrace.com/docs/ingest-from/opentelemetry/otlp-api" rel="noopener noreferrer"&gt;Dynatrace OTLP API documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Check the token and its header
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;OTEL_EXPORTER_OTLP_HEADERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Authorization=Api-Token%20dt0c01.XXXX"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Api-Token&lt;/code&gt; prefix followed by a space is mandatory; in this variable, the space is written &lt;code&gt;%20&lt;/code&gt;. A 401 means an invalid or malformed token, a 403 a missing scope. Test the endpoint by hand to settle it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -o /dev/null -w &lt;span class="s2"&gt;"%{http_code}\n"&lt;/span&gt; -X POST \
  &lt;span class="s2"&gt;"https://&amp;lt;env-id&amp;gt;.live.dynatrace.com/api/v2/otlp/v1/traces"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Authorization: Api-Token $DT_TOKEN"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/x-protobuf"&lt;/span&gt; \
  --data-binary @/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An empty body is not a valid trace: focus on the difference between 401/403 (authentication), 404 (path) and a 2xx or 400 response (the endpoint is reachable and the token accepted). The exact code for an empty body may vary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Check the network and TLS
&lt;/h3&gt;

&lt;p&gt;From the application pod or host (not from your laptop):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -v https://&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;env-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.live.dynatrace.com/api/v2/otlp/v1/traces 2&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;1 &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"Connected|SSL|HTTP/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A timeout points to a firewall, an unconfigured outbound proxy or a Kubernetes NetworkPolicy. A certificate error on Managed often means an internal authority that the application runtime does not know; add it to the runtime trust store.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 — Read the Collector logs and metrics
&lt;/h3&gt;

&lt;p&gt;If a Collector is in the chain, temporarily add the &lt;code&gt;debug&lt;/code&gt; exporter to the traces pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;debug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;verbosity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;detailed&lt;/span&gt;
  &lt;span class="na"&gt;otlphttp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://&amp;lt;env-id&amp;gt;.live.dynatrace.com/api/v2/otlp&lt;/span&gt;
    &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Api-Token ${env:DT_API_TOKEN}"&lt;/span&gt;
&lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pipelines&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;traces&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;receivers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;otlp&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;batch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;otlphttp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;debug&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the spans show up in the &lt;code&gt;debug&lt;/code&gt; log but not in Dynatrace, the problem is on the way out (steps 3 to 5). If they do not show up, the receiver gets nothing (steps 1 and 2). The Collector’s internal metrics, exposed by default on port 8888, confirm the diagnosis: compare &lt;code&gt;otelcol_receiver_accepted_spans&lt;/code&gt;, &lt;code&gt;otelcol_exporter_sent_spans&lt;/code&gt; and &lt;code&gt;otelcol_exporter_send_failed_spans&lt;/code&gt; (a &lt;code&gt;_total&lt;/code&gt; suffix may be added depending on the version).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7 — Check sampling and filters
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;filter&lt;/code&gt; or &lt;code&gt;tail_sampling&lt;/code&gt; processor that is too strict can drop every trace of a low-traffic service. A &lt;code&gt;parentbased_traceidratio&lt;/code&gt; sampler at 0.01 on a test service with 10 requests per hour produces almost nothing. Switch back to &lt;code&gt;always_on&lt;/code&gt; temporarily and remove the filters to confirm.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 8 — Look for the spans in the right place in Dynatrace
&lt;/h3&gt;

&lt;p&gt;Sometimes the spans do arrive, but under another service name, in another timeframe or outside your management zone. On SaaS, query Grail directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch spans, from: now() - 30m
| filter contains(service.name, "checkout")
| summarize spans = count(), by: { service.name, k8s.namespace.name }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Managed, open &lt;strong&gt;Distributed traces&lt;/strong&gt;, filter on the recent timeframe and remove the management zone. A wrong timestamp (drifting container clock) also places spans outside the displayed window: compare the server time with an NTP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check that it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; The Collector logs no longer show export errors, and &lt;code&gt;otelcol_exporter_send_failed_spans&lt;/code&gt; stays flat.&lt;/li&gt;
&lt;li&gt; The step 8 DQL query returns a non-zero span count for your service.&lt;/li&gt;
&lt;li&gt; An end-to-end trace opens and shows the spans of each service, with a common parent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To go further on propagation between services, read &lt;a href="https://span.observer/en/opentelemetry-end-to-end-dynatrace/" rel="noopener noreferrer"&gt;end-to-end OpenTelemetry with Dynatrace&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Keep a minimal test pipeline (OTLP receiver, batch, export) and document it in the on-call runbook.&lt;/li&gt;
&lt;li&gt;  Monitor the Collector itself: an alert on export failures avoids discovering the outage during an incident.&lt;/li&gt;
&lt;li&gt;  Store the token in a secret, never in clear text in a manifest or repository.&lt;/li&gt;
&lt;li&gt;  Avoid double instrumentation: if OneAgent already instruments the process, check in the documentation how it coexists with an OpenTelemetry SDK.&lt;/li&gt;
&lt;li&gt;  Once traces are back, turn them into indicators: see &lt;a href="https://span.observer/en/opentelemetry-slo-dynatrace-dql/" rel="noopener noreferrer"&gt;creating an SLO on OpenTelemetry data&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Dynatrace accept OTLP over gRPC?
&lt;/h3&gt;

&lt;p&gt;The Dynatrace API OTLP endpoint is documented for OTLP over HTTP. To send gRPC, place a Collector that receives gRPC and exports HTTP to Dynatrace.&lt;/p&gt;

&lt;h3&gt;
  
  
  Metrics arrive but traces do not: why?
&lt;/h3&gt;

&lt;p&gt;Each signal has its own path (&lt;code&gt;/v1/traces&lt;/code&gt;, &lt;code&gt;/v1/metrics&lt;/code&gt;, &lt;code&gt;/v1/logs&lt;/code&gt;) and token scope. Check that the token also carries &lt;code&gt;openTelemetryTrace.ingest&lt;/code&gt; and that the &lt;code&gt;traces&lt;/code&gt; pipeline exists in the Collector.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long should I wait before seeing spans?
&lt;/h3&gt;

&lt;p&gt;Usually a few seconds to a minute, depending on the &lt;code&gt;batch&lt;/code&gt; processor and ingestion. Beyond a few minutes, go back through the checklist rather than waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Eight checks almost always suffice: production, protocol, URL, token, network, Collector, sampling, search. Keep this checklist in your runbook: the next telemetry incident will be solved in minutes, not hours.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/opentelemetry-traces-not-showing-dynatrace/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/traces-opentelemetry-absentes-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/traces-opentelemetry-absentes-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>collector</category>
      <category>distributedtracing</category>
      <category>dynatracemanaged</category>
      <category>dynatracesaas</category>
    </item>
    <item>
      <title>CCSS score: reading the severity of a Kubernetes misconfiguration</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Wed, 25 Nov 2026 17:30:15 +0000</pubDate>
      <link>https://dev.to/spanobserver/ccss-score-reading-the-severity-of-a-kubernetes-misconfiguration-24n4</link>
      <guid>https://dev.to/spanobserver/ccss-score-reading-the-severity-of-a-kubernetes-misconfiguration-24n4</guid>
      <description>&lt;p&gt;Three rules fail on your cluster: one is marked «&amp;nbsp;Critical&amp;nbsp;», one «&amp;nbsp;Medium&amp;nbsp;», one «&amp;nbsp;Low&amp;nbsp;». You have a day. Which do you start with, and why does each carry that severity? The CCSS score (Common Configuration Scoring System) is Dynatrace’s answer to that question for Kubernetes and cloud misconfigurations, and it is worth knowing what it measures before you lean on it.&lt;/p&gt;

&lt;p&gt;I am not going back over enabling posture management; &lt;a href="https://span.observer/en/kspm-kubernetes-dynatrace-setup/" rel="noopener noreferrer"&gt;the KSPM and DynaKube article&lt;/a&gt; covers it. Assume the results are already there, and the question is how to read the severity label. Everything here applies to &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt;, based on the Security Posture Management documentation and the vendor’s blog post.&lt;/p&gt;

&lt;h2&gt;
  
  
  CCSS score: what Dynatrace says, and what it leaves out
&lt;/h2&gt;

&lt;p&gt;The concepts page says a rule’s severity (Critical, High, Medium or Low) is determined with the Common Configuration Scoring System. Three groups of criteria feed it: &lt;em&gt;likelihood&lt;/em&gt; (how easily the weakness can be exploited), &lt;em&gt;technical impact&lt;/em&gt; (the effect on confidentiality, integrity and availability) and &lt;em&gt;configuration impact&lt;/em&gt; (how far the flaw weakens the expected security controls).&lt;/p&gt;

&lt;p&gt;The vendor’s post adds that researchers and domain experts score each weakness, and that a domain expert assigns the final label. It also says these severities replace older labels based on other factors, such as implementation difficulty, so some rules change level. On SaaS this happened automatically with version 1.334, rolled out in March 2026.&lt;/p&gt;

&lt;p&gt;What neither the documentation nor the post publishes: Dynatrace’s exact formula, the thresholds between levels, and the new level of each rule. I do not make them up. The rest of this article therefore leans on the public specification, with its limit kept in mind: it explains the principle, not the vendor’s internal computation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The NIST IR 7502 specification: the base equation
&lt;/h2&gt;

&lt;p&gt;CCSS is described in &lt;a href="https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7502.pdf" rel="noopener noreferrer"&gt;NIST IR 7502&lt;/a&gt;. Its base equation is the CVSS one: a score from 0 to 10 combining an exploitability and an impact. Exploitability multiplies three factors (access vector, authentication, access complexity); impact aggregates the loss of confidentiality, integrity and availability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnpd3aoibg7oc3gpbvom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnpd3aoibg7oc3gpbvom.png" alt="CCSS base equation and the value of each metric, copied from section 3.2.1 of NIST IR 7502" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two reading notes. First, a door open on the network, with no authentication and easy to use, has an exploitability about six times that of a local access that needs an account and a delicate manoeuvre (10.0 against 1.5 with the values above). Second, impact is not linear: the first dimension at «&amp;nbsp;complete&amp;nbsp;» lifts impact to 6.9, and the next two only bring it to 9.2, then 10.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compute it yourself: one flaw, four profiles
&lt;/h2&gt;

&lt;p&gt;To get a feel for the orders of magnitude, I transcribed the equation into a few lines of Python. The script says nothing about Dynatrace: it is a calculator for the specification.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feg5lfz1jlt57515xw55i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feg5lfz1jlt57515xw55i.png" alt="Sixteen-line Python script ccss.py: lookup tables for the CCSS metrics and a base() function applying the NIST equation" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The profiles are fictional, chosen to isolate one criterion at a time:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97s8eouo6vit9om085uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97s8eouo6vit9om085uu.png" alt="Script output: open network with no authentication 10.0, same flaw with single authentication 9.0, complex local access 6.0, logging disabled with partial impact 3.5" width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Network, no authentication, complete impact: 10.0.&lt;/strong&gt; This is a component that accepts everything from the network. The vendor’s post gives an example of exactly this kind: the CIS Kubernetes rule forbidding &lt;code&gt;--authorization-mode=AlwaysAllow&lt;/code&gt;, scored with a network vector, no authentication, low complexity and complete impact on all three dimensions, and classed Critical.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Same flaw with single authentication: 9.0.&lt;/strong&gt; Requiring an account removes one point, no more.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Local access, high complexity: 6.0.&lt;/strong&gt; The flaw is as serious once exploited, but the attacker must already be on the machine.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Logging switched off, partial integrity impact: 3.5.&lt;/strong&gt; The specification recommends at least a partial integrity loss here, since the flaw hides the traces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same impact weight therefore gives very different severities depending on how far away the attacker is. That is the point of a score: it separates «&amp;nbsp;serious if someone gets there&amp;nbsp;» from «&amp;nbsp;easy to reach&amp;nbsp;».&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading a rule’s severity in Security Posture Management
&lt;/h2&gt;

&lt;p&gt;In the app, severity is a sort key: the &lt;strong&gt;Assessment results&lt;/strong&gt; view puts failed, critical rules first. A rule’s result is &lt;em&gt;Failed&lt;/em&gt; as soon as one resource fails, however many are healthy. A «&amp;nbsp;Critical&amp;nbsp;» rule hitting one resource and a «&amp;nbsp;High&amp;nbsp;» rule hitting fifty are not directly comparable: severity describes the rule, not the breadth of exposure.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Findings&lt;/strong&gt; view then gives the per-resource detail. My method, in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Filter on Critical and High, then count resources per rule.&lt;/li&gt;
&lt;li&gt; For each rule, ask whether the vector really is network-reachable in &lt;em&gt;your&lt;/em&gt; cluster: a component already isolated by a network policy changes the exposure, which a generic score cannot see.&lt;/li&gt;
&lt;li&gt; Set the «&amp;nbsp;Manual&amp;nbsp;» rules aside; the documentation says they are not actionable for now.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What the score does not know about your environment
&lt;/h2&gt;

&lt;p&gt;A base CCSS score is &lt;em&gt;intrinsic&lt;/em&gt;: it judges the weakness in general. The specification’s temporal and environmental metrics (patch availability, organisation-specific security requirements) exist to refine it. I found no mention in the documentation or the post of Dynatrace using them, so I treat them as not applied, without being able to assert it.&lt;/p&gt;

&lt;p&gt;In practice: a «&amp;nbsp;Low&amp;nbsp;» rule on a cluster holding regulated data may deserve priority, and a «&amp;nbsp;Critical&amp;nbsp;» on a throwaway test cluster can wait. Severity guides the sorting; the decision stays yours. For image and code vulnerabilities, a scan such as &lt;a href="https://span.observer/en/trivy-vulnerability-scanner-kubernetes/" rel="noopener noreferrer"&gt;Trivy&lt;/a&gt; or &lt;a href="https://span.observer/en/dynatrace-application-security-runtime-vulnerabilities/" rel="noopener noreferrer"&gt;Application Security&lt;/a&gt; uses other scales, which should not be mixed with this one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  Note the switch date: after 1.334, comparing an old export with a recent one mixes two scales.&lt;/li&gt;
&lt;li&gt;  Do not build an alert on a numeric threshold: Dynatrace does not publish the thresholds between levels.&lt;/li&gt;
&lt;li&gt;  Keep the failing «&amp;nbsp;Critical&amp;nbsp;» rules in your weekly operations review, with one owner per rule.&lt;/li&gt;
&lt;li&gt;  To understand a surprising severity, compare it with the vector described in the original rule (a CIS benchmark, for example) rather than the name alone.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is the CCSS score the same as the CVSS score of vulnerabilities?
&lt;/h3&gt;

&lt;p&gt;No. According to NIST, the CCSS base equation reuses the CVSS one, but CCSS scores configuration errors, not software flaws. The two scales are not comparable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I recompute the displayed severity with my own calculator?
&lt;/h3&gt;

&lt;p&gt;Not reliably. Dynatrace publishes neither its exact formula nor its thresholds, and says an expert assigns the label. Use the calculator to understand the effect of a criterion, not to check a result.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about Dynatrace Managed?
&lt;/h3&gt;

&lt;p&gt;The post says to update to version 1.334 or later. I have not verified the behaviour in the Managed documentation: test before relying on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;A posture rule’s severity is neither an opinion nor a percentage of risk: it is the outcome of a standardised ranking in which ease of access weighs as much as impact. Use it to order your day, then fix with what you know of your cluster. To place these rules within the topology, see also &lt;a href="https://span.observer/en/kubernetes-topology-dql/" rel="noopener noreferrer"&gt;querying Kubernetes topology with DQL&lt;/a&gt;. Vendor source: &lt;a href="https://www.dynatrace.com/news/blog/strengthen-your-security-posture-with-the-common-configuration-scoring-system-for-misconfigured-production-environments/" rel="noopener noreferrer"&gt;the post on CCSS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Independent blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. The script in this article applies NIST’s public specification, not the vendor’s internal computation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/ccss-score-kubernetes-misconfigurations/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/score-ccss-misconfigurations-kubernetes/" rel="noopener noreferrer"&gt;https://span.observer/fr/score-ccss-misconfigurations-kubernetes/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>analysis</category>
      <category>compliance</category>
      <category>dynatracesaas</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>SLO burn rate alerts in Dynatrace: a multi-window tutorial (SaaS and Managed)</title>
      <dc:creator>Span Observer</dc:creator>
      <pubDate>Wed, 25 Nov 2026 15:30:17 +0000</pubDate>
      <link>https://dev.to/spanobserver/slo-burn-rate-alerts-in-dynatrace-a-multi-window-tutorial-saas-and-managed-5alc</link>
      <guid>https://dev.to/spanobserver/slo-burn-rate-alerts-in-dynatrace-a-multi-window-tutorial-saas-and-managed-5alc</guid>
      <description>&lt;p&gt;An SLO without an alert is just a number on a dashboard. An alert on a fixed error threshold wakes the on-call engineer for a two-minute spike and misses a slow degradation that drains the budget in three days. SLO burn rate alerts fix both problems: they measure how fast you are consuming your error budget, not the raw error rate.&lt;/p&gt;

&lt;p&gt;The goal of this tutorial: create an SLO in Dynatrace, set two burn rate alerts (fast and slow), route them to the right team and check that they fire. It covers &lt;strong&gt;Dynatrace SaaS&lt;/strong&gt; (new SLOs on Grail) and &lt;strong&gt;Dynatrace Managed&lt;/strong&gt; (classic SLOs). Each step says which one applies.&lt;/p&gt;

&lt;p&gt;No long theory here: if you are new to SRE culture, start with &lt;a href="https://span.observer/en/ai-sre-reliability/" rel="noopener noreferrer"&gt;AI and reliability: what SREs need to know&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick recap: SLI, SLO, error budget
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;SLI&lt;/strong&gt;: the measurement, for example the percentage of successful requests.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;SLO&lt;/strong&gt;: the target over a window, for example 99.9% over 30 days.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Error budget&lt;/strong&gt;: what the target allows you to miss, here 0.1% of requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Burn rate in numbers
&lt;/h2&gt;

&lt;p&gt;Burn rate is the ratio between the observed error rate and the error rate the SLO allows. A burn rate of 1 consumes exactly the budget over the full window. A burn rate of 10 consumes it ten times faster.&lt;/p&gt;

&lt;p&gt;Reference example for the whole article: an SLO of 99.9% over 30 days.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Window: 30 × 24 × 60 = 43,200 minutes.&lt;/li&gt;
&lt;li&gt;  Error budget: 0.1% of 43,200 = &lt;strong&gt;43.2 minutes&lt;/strong&gt; of full downtime (or the equivalent in failed requests).&lt;/li&gt;
&lt;li&gt;  Burn rate 14.4: error rate of 1.44%. The budget is gone in 30 d / 14.4 ≈ 50 hours. One hour at this pace consumes 2% of the budget.&lt;/li&gt;
&lt;li&gt;  Burn rate 6: error rate of 0.6%. Six hours at this pace consume 5% of the budget.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Multi-window SLO burn rate alerts: the method
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://sre.google/workbook/alerting-on-slos/" rel="noopener noreferrer"&gt;Google SRE Workbook («&amp;nbsp;Alerting on SLOs&amp;nbsp;» chapter)&lt;/a&gt; recommends combining several burn rates and, for each one, a long window and a short window:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Alert&lt;/th&gt;
&lt;th&gt;Long window&lt;/th&gt;
&lt;th&gt;Short window&lt;/th&gt;
&lt;th&gt;Burn rate&lt;/th&gt;
&lt;th&gt;Budget consumed&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fast&lt;/td&gt;
&lt;td&gt;1 h&lt;/td&gt;
&lt;td&gt;5 min&lt;/td&gt;
&lt;td&gt;14.4&lt;/td&gt;
&lt;td&gt;2%&lt;/td&gt;
&lt;td&gt;Page (on-call)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Slow&lt;/td&gt;
&lt;td&gt;6 h&lt;/td&gt;
&lt;td&gt;30 min&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;Page or ticket&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The alert fires only when both windows exceed the threshold. The long window ensures the consumption is significant. The short window ensures the problem is still ongoing: the alert resolves quickly after the fix, which improves measured MTTR and avoids noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  In practice
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;SaaS&lt;/strong&gt;: an environment on the Grail platform, access to the Service-Level Objectives app, permissions to read metrics and write SLOs. The exact permissions are listed in the documentation.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Managed&lt;/strong&gt;: a recent cluster version and a role allowed to change environment settings. For the API: a token with the &lt;code&gt;slo.read&lt;/code&gt; and &lt;code&gt;slo.write&lt;/code&gt; scopes.&lt;/li&gt;
&lt;li&gt;  A service already monitored by OneAgent or OpenTelemetry, with traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1 — Create the SLO in Dynatrace SaaS
&lt;/h3&gt;

&lt;p&gt;Open the &lt;strong&gt;Service-Level Objectives&lt;/strong&gt; app and create an SLO. Start from a template (for example service availability) or from a custom SLI written in DQL. Example availability SLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timeseries {
    total = sum(dt.service.request.count),
    failures = sum(dt.service.request.failure_count)
  },
  by: { dt.entity.service },
  filter: { dt.entity.service == "SERVICE-1234567890ABCDEF" }
| fieldsAdd sli = 100 * (total[] - failures[]) / total[]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Critical lines: &lt;code&gt;failure_count&lt;/code&gt; defines what counts as an error, and therefore what consumes the budget. &lt;code&gt;sli&lt;/code&gt; must return a percentage between 0 and 100. Then set the target to 99.9 and the window to 30 days. Metric names and the expected query shape may change: check them in the &lt;a href="https://docs.dynatrace.com/docs/deliver/service-level-objectives" rel="noopener noreferrer"&gt;Service-Level Objectives documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Create the SLO in Dynatrace Managed
&lt;/h3&gt;

&lt;p&gt;In &lt;strong&gt;Service-level objectives&lt;/strong&gt; (classic SLOs), add an SLO based on a metric expression:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(100)*(builtin:service.errors.server.successCount:splitBy())
  /(builtin:service.requestCount.server:splitBy())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add an entity filter (&lt;code&gt;type("SERVICE"),tag("app:checkout")&lt;/code&gt; for example), a target of 99.9 and a timeframe of &lt;code&gt;-30d&lt;/code&gt;. The screen also offers a &lt;em&gt;fast burn rate&lt;/em&gt; threshold: set it to 14.4 to match the fast alert.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Set the burn rate alerts
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SaaS&lt;/strong&gt;: from the SLO, use the app’s alert creation option. It relies on Davis anomaly detection and raises an event when the burn rate exceeds the threshold. Create one alert with a threshold of 14.4 and a second with a threshold of 6. If the interface does not let you choose both windows, create a custom detector in Anomaly Detection with a DQL query that computes the burn rate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;timeseries {
    total = sum(dt.service.request.count),
    failures = sum(dt.service.request.failure_count)
  },
  filter: { dt.entity.service == "SERVICE-1234567890ABCDEF" },
  interval: 5m
| fieldsAdd burn_rate = (failures[] / total[]) / 0.001
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here &lt;code&gt;0.001&lt;/code&gt; is the error rate allowed by a 99.9% SLO. The detector compares &lt;code&gt;burn_rate&lt;/code&gt; with 14.4; the window length is set in its violation settings (number of samples in a sliding window).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Managed&lt;/strong&gt;: on the SLO, add a &lt;em&gt;burn rate&lt;/em&gt; alert (threshold 14.4) and a status alert (for example below 99.95%). Dynatrace creates the matching metric events. For the slow alert at 6, create a custom metric event on the SLO’s burn rate metric. Classic SLOs do not support the dual window natively: approximate it with the violation samples.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Route the alerts
&lt;/h3&gt;

&lt;p&gt;Both alerts open a Davis problem. Now send them to the right place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Managed and SaaS (classic)&lt;/strong&gt;: an alerting profile filters on the service tag or the event title, then an integration (PagerDuty, Opsgenie, email) sends it. See &lt;a href="https://span.observer/en/dynatrace-managed-alerting-profiles-notifications/" rel="noopener noreferrer"&gt;alerting profiles and integrations&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;SaaS&lt;/strong&gt;: a Workflow triggered on Davis problems, filtered on the alert name, sends the fast alert to on-call and the slow one to a ticket. See &lt;a href="https://span.observer/en/dynatrace-workflows-automation/" rel="noopener noreferrer"&gt;the Workflows module&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Worked example
&lt;/h2&gt;

&lt;p&gt;Checkout service, SLO of 99.9% over 30 days, 1,000,000 requests per day. Budget: 30,000 failed requests per month. A deployment pushes the error rate to 2%, a burn rate of 20. After 5 minutes, the short window exceeds 14.4. The one-hour window only reaches 14.4 after about 43 minutes (14.4 / 20 × 60). By then, about 600 requests have failed, 2% of the budget: on-call is paged. The rollback brings errors back to 0.05%, the 5-minute window drops below the threshold and the alert closes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check that it works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; In the SLO app (SaaS) or the SLO list (Managed), the SLO shows a status, a remaining error budget and a burn rate consistent with your calculations.&lt;/li&gt;
&lt;li&gt; Temporarily raise the target (99.999%) on a test SLO: the fast alert should open a problem.&lt;/li&gt;
&lt;li&gt; On SaaS, look for the event in Grail:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fetch dt.davis.events, from: now() - 24h
| filter contains(event.name, "burn")
| fields timestamp, event.name, event.status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adapt the filter to the name you gave the alert. On Managed, open the problems feed and check the problem’s notifications tab.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;The SLO stays empty&lt;/strong&gt;: the SLI returns no data. Run the query alone in a Notebook or the data explorer and check the entity filter.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Absurd burn rate (thousands)&lt;/strong&gt;: the SLI is a fraction (0–1) instead of a percentage, or traffic is near zero. Add a minimum request volume.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Problem opened but no notification&lt;/strong&gt;: the alerting profile or the Workflow filter does not match. Check the tag and the profile delay.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Too many alerts&lt;/strong&gt;: the short window is missing; increase the number of violation samples.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Best practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  One SLO per critical user journey, not per microservice.&lt;/li&gt;
&lt;li&gt;  Only the fast alert wakes someone up; the slow one can open a ticket.&lt;/li&gt;
&lt;li&gt;  Document the runbook in the alert description.&lt;/li&gt;
&lt;li&gt;  For latency, use histograms: see &lt;a href="https://span.observer/en/histogram-metrics-openpipeline-slo/" rel="noopener noreferrer"&gt;histogram metrics with OpenPipeline&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Review thresholds in blameless post-mortems, with numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why 14.4 and 6?
&lt;/h3&gt;

&lt;p&gt;These are the values the Google SRE Workbook suggests for a 30-day SLO: 2% of the budget consumed in one hour, 5% in six hours. Adjust them to your window and tolerance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do classic SLOs still work on SaaS?
&lt;/h3&gt;

&lt;p&gt;Yes in many environments, but the new SLOs on Grail are the recommended path. Check the migration timeline in the documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need a status alert as well as burn rate?
&lt;/h3&gt;

&lt;p&gt;It is a useful complement for reporting. For on-call, burn rate is more reliable: it warns you before the budget runs out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Two well-tuned alerts replace a dozen static thresholds. Burn rate ties the alert directly to the error budget, and therefore to the reliability users actually experience. Start with a single critical SLO, validate the numbers in a test, then expand.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. SaaS features evolve quickly: check their availability in your environment and in the official documentation.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://span.observer/en/slo-burn-rate-alerts-dynatrace/" rel="noopener noreferrer"&gt;span.observer&lt;/a&gt;. French version: &lt;a href="https://span.observer/fr/alertes-burn-rate-slo-dynatrace/" rel="noopener noreferrer"&gt;https://span.observer/fr/alertes-burn-rate-slo-dynatrace/&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>alerting</category>
      <category>burnrate</category>
      <category>dql</category>
      <category>dynatracemanaged</category>
    </item>
  </channel>
</rss>
