RousselTMLEARNING

Article · Datadog: from discovery to expertise

Advanced metrics and cardinality

1. Types #

Choosing the right type.

Types #

TypeExampleGood to know
CountNumber of orders in the intervalCan be summed; .as_count()
RateRequests per secondNormalized per second
GaugeMemory used, queue sizeLast value of the interval
HistogramLatency (agent)Produces avg, max, median, p95 computed per agent: not aggregatable across hosts
DistributionGlobal latencyPercentiles computed by Datadog over all values: true global p95/p99

2. Aggregations #

Time and space.

Query #

Time and space aggregation
  • Time aggregation (.rollup(avg, 60)) reduces each series to one point per interval; over a long period, Datadog picks the interval automatically.
  • Space aggregation (avg by {service}) combines series that share a tag.
  • For reliable percentiles across hosts, use distributions, not averages of p95.

3. Cardinality #

The number one source of surprise bills.

Series #

Cardinality explosion depending on tags

A custom metric is billed per unique combination of name and tag values. A tag with unbounded values (user ID, request ID, full URL) makes the number of series explode.

Common mistake: Never put a unique identifier as a metric tag: use logs or traces for that level of detail.

Metrics without Limits #

Metrics without Limits separates ingestion from indexing: all series are ingested, but only the tags useful for queries, configured per metric, are indexed (and paid for). Unneeded aggregations (for example percentiles on a count metric) can also be disabled.

📄 Advanced Datadog metrics: types, aggregations, cardinality and Metrics without Limits →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Recommended Articles

Metrics and tags in Datadog: unified tagging, DogStatsD and cardinality

Use Datadog metrics: unified tagging (env, service, version), queries and aggregations, custom me...

Advanced Datadog APM: sampling, retention, profiler and Software Catalog

Go further with Datadog APM: ingestion control and sampling, retention filters, trace metrics, Co...

Datadog best practices: tags, costs, alerts and governance

Checklist for using Datadog effectively: unified tagging, cost control (hosts, logs, custom metri...

Advanced Datadog logs: indexes, exclusion filters, Flex Logs, archives and Sensitive Data Scanner

Control the cost and compliance of Datadog logs: pipelines and processors, indexes and retention,...

Datadog dashboards and notebooks: widgets, template variables and best practices

Design useful Datadog dashboards: widget types, template variables, groups, Powerpacks, formulas,...

Advanced infrastructure with Datadog: network, cloud, containers and databases

Monitor infrastructure beyond hosts: Network Performance Monitoring, AWS, Azure and GCP integrati...

Monitors, SLOs, dashboards and Datadog as code

Create effective monitors (metrics, logs, APM, composites, anomalies), SLOs, dashboards, and mana...

Dynatrace metrics: Data Explorer, metric selectors, API and dashboards

Use metrics in Dynatrace: built-in and custom metrics, Data Explorer, metric selector syntax, Met...

Prometheus best practices: metrics, cardinality, rules and operations

Prometheus best practices: metric naming, labels and cardinality, scrape intervals, recording rul...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!