{
  "id": 22999451,
  "title": "Prometheus metrics, Dynatrace and Kubernetes: scraping exporters step by step",
  "url": "https://urgent.news/2026/12/01/prometheus-metrics-dynatrace-and-kubernetes-scraping-exporters-step",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-01T19:30:20.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/spanobserver/prometheus-metrics-dynatrace-and-kubernetes-scraping-exporters-step-by-step-2d1l"
  },
  "original_language": null,
  "account": "Prometheus metrics, Dynatrace and Kubernetes: Scraping exporters step by step\n\nTo wire Prometheus metrics, Dynatrace and your Kubernetes cluster together, there are two methods: using pod annotations read by the ActiveGate or an OpenTelemetry Collector with the Prometheus receiver. Both methods can coexist during a migration, provided the same pod is not scraped twice.\n\nMethod 1: Annotations read by the ActiveGate\n1. Enable collection of namespaces, services, workloads and pods in Dynatrace, then enable monitoring of annotated Prometheus exporters in the Kubernetes cluster monitoring settings.\n2. Annotate the exporter pod with the following metadata:\na. `metrics.dynatrace.com/scrape: \"true\"`\nb. `metrics.dynatrace.com/port: \"<port>\"`\nc. `metrics.dynatrace.com/path: \"/metrics\"`\nd. `metrics.dynatrace.com/filter`: A JSON filter to include specific metrics of interest.\n3. Ensure the pod template containing the annotations, not the Deployment itself.\n4. If the namespace is protected by a NetworkPolicy, allow traffic from the ActiveGate pod in the dynatrace namespace.\n\nMethod 2: OpenTelemetry Collector with the Prometheus receiver\n1. Create a secret with Dynatrace API credentials.\n2. Deploy the OpenTelemetry Collector using a configuration file:\na. Define a Prometheus receiver with a scrape configuration for the exporter pod.\nb. Set the scrape interval to 60s and specify the pod's label for matching.\nc. Enable the kubernetes_sd_configs to scrape pods dynamically.\nd. Add a processor to convert Prometheus counters to delta temporality, as Dynatrace expects.\ne. Configure the OpenTelemetry exporter to send metrics to the Dynatrace endpoint using the provided API token.\n3. Ensure the OpenTelemetry Collector has the necessary permissions to list pods in the cluster.\n4. Monitor the OpenTelemetry Collector logs for any errors or refusals related to scraping metrics.\n\nTo verify if the setup is working, check the OpenTelemetry Collector logs for any error messages, particularly 401 or 403, indicating unauthorized access. Additionally, monitor the Collector's own metrics to ensure the `otelcol_receiver_accepted_metric_points` metric is rising. Finally, use Dynatrace notebooks or the data explorer to confirm that the exporter metrics are being ingested correctly.",
  "summary": "Your teams already expose metrics in Prometheus format: a Redis exporter, a /metrics endpoint in every microservice, ingress metrics. Ignoring them means throwing away ready-made SLIs. Wiring Prometheus metrics, Dynatrace and your Kubernetes cluster together brings them into the same platform as traces and logs, without rewriting a line of code. For SREs the stake is simple: a latency SLO…",
  "summary_source": "publisher",
  "key_points": [],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}