1. Types #
Choosing the right type.
Types #
| Type | Example | Good to know |
|---|---|---|
| Count | Number of orders in the interval | Can be summed; .as_count() |
| Rate | Requests per second | Normalized per second |
| Gauge | Memory used, queue size | Last value of the interval |
| Histogram | Latency (agent) | Produces avg, max, median, p95 computed per agent: not aggregatable across hosts |
| Distribution | Global latency | Percentiles computed by Datadog over all values: true global p95/p99 |
2. Aggregations #
Time and space.
Query #
- 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 #
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.
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Datadog : relier traces, logs et métriques du même service✓ solved · 1 reply(ies)
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...