- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Generate metrics from 100% of ingested spans, regardless of whether the spans are indexed by a retention filter.
Use custom metrics for specific fixed queries and comparisons, while creating retention filters to allow arbitrary querying and investigation of the retained trace and its flame graph.
Billing Note: Metrics created from ingested spans are billed as Custom Metrics.
For example, you may want to use custom metrics to visualize anomalies, create dashboards and monitors, and see trends across any parameters that are important to your business context. All generated metrics are available for 15 months as Datadog custom metrics.
Reason | Custom Metrics Generated from Spans | Retention Filters |
---|---|---|
Retention Period | 15 months | 15 days |
Anomaly Detection | Create an Anomaly Monitor based on generated metrics. | Use Analytics to compare behavior over the past 15 days, and view complete traces to investigate root cause. |
Investigation of matching traces with full context | N/A - Custom Metrics do not result in any retention of associated traces. | Keep exactly the traces relevant to your business context with retention filters. |
Granularity of behavior | Create custom metrics for important endpoints or other low-cardinality groups. | Use Trace Explorer for specific endpoints, or use the ‘Group By’ option in Analytics. |
Forecasting or complex mathematics | Create a Forecast monitor based on generated metrics. | N/A |
To generate metrics from spans, on the APM Setup and Configuration page select the Generate Metrics tab, and click the New Metric button.
Define the metric query: Start by adding a query for filtering to your required dataset. The query syntax is the same as APM Search and Analytics.
Define the field you want to track: Select *
to generate a count of all spans matching your query or enter an attribute (for example, @cassandra_row_count
) to aggregate a numeric value and create its corresponding count, minimum, maximum, sum, and average aggregated metrics. If the attribute type is a measure, the value of the metric is the value of the span attribute.
Note: Span attributes that are not numerical values cannot be used for aggregation. To generate a metric that counts the distinct values of a span attribute (for instance count the number of user IDs hitting a specific endpoint), add this dimension to the group by
selector, and use the count_nonzero
function to count the number of tag values.
Specify the group-by dimension: By default, metrics generated from spans will not have any tags unless explicitly added. Any attribute or tag that exists in your spans can be used to create metric tags.
Check the Live Analytics and Search Query preview: You can view the impact of your query in real-time on the data visualization, and the matching spans considered for your query in a live preview.
Name your metric: Metric names must follow the metric naming convention. Metric names that start with trace.*
are not permitted and will not be saved.
After a metric is created, only two fields can be updated:
Field | Reason |
---|---|
Stream filter query | Change the set of matching spans to be aggregated into metrics. |
Aggregation groups | Update the tags to manage the cardinality of generated metrics. |
Note: To change the metric type or name, create a new metric and delete the old one.