Mapping Prometheus Metrics to Datadog Metrics

Mapping Prometheus Metrics to Datadog Metrics

If you are using Datadog’s Prometheus or OpenMetrics checks, you may be interested in how these metrics map to existing Datadog metrics types.

See the Prometheus and OpenMetrics metrics collection documentation for more information.

Prometheus and OpenMetrics metric types

  • counter: a cumulative metric that represents a single monotonically increasing counter, whose value can only increase—or be reset to zero.
  • gauge: a metric that represents a single numeric value, which can arbitrarily go up and down.
  • histogram: samples observations and counts them in configurable buckets; also provides a sum of all observed values.
  • summary: similar to histogram; samples observations, provides a sum of all observed values, and calculates configurable quantiles over a sliding time window.

How Prometheus/OpenMetrics metrics map to Datadog metrics

For more information about Datadog metric types, see the Datadog Metric Types documentation.

Counter

By default, Prometheus/OpenMetrics counter is mapped to Datadog’s monotonic_count.

However, if the parameter send_monotonic_counter is false, then this metric is sent as gauge. Read more about monotonic counters.

Gauge

Prometheus/OpenMetrics gauge maps to Datadog’s gauge.

Histogram

For Prometheus/OpenMetrics histogram, the _count and _sum values of the histogram are each mapped to Datadog’s gauge.

If the parameter send_histograms_buckets is true, each _bucket value is also mapped to Datadog’s gauge.

If the parameter send_distribution_buckets is true, each _bucket is mapped to Datadog’s distribution. Prometheus/OpenMetrics histogram data is converted to Datadog distribution metrics to allow for easily monitoring Kubernetes metrics as percentiles in Datadog. Datadog distribution metrics are based on the DDSketch algorithm. For more information, see the relevant Datadog blog post on OpenMetrics and distribution metrics.

If the parameter send_distribution_counts_as_monotonic is true, each metric ending in _count is submitted as monotonic_count. Read more about monotonic counters.

Summary

For Prometheus/OpenMetrics summary, the _count and _sum values of the summary are each mapped to Datadog’s gauge.

If the parameter send_distribution_buckets is true, the histogram is converted to a distribution, and each _bucket can be fetched using distribution tags.

If the parameter send_distribution_counts_as_monotonic is true, each metric ending in _count is submitted as monotonic_count. Read more about monotonic counters.