- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
With Datadog APM, the ingestion and the retention of traces for 15 days are fully customizable.
To track or monitor your volume of ingested and indexed data, see the Usage Metrics documentation.
After spans have been ingested, some are kept for 15 days according to the retention filters that are set up on your account:
Note: The permission apm_retention_filter_write
is required to create, delete, modify, enable, or disable retention filters.
In Datadog, on the Retention Filters settings page, you can see a list of all retention filters:
Note: The order of the retention filter list changes indexing behavior. If a span matches a retention filter early in the list, the span is either kept or dropped. Any matching custom retention filter lower on the list does not catch the already-processed span.
The Spans Indexed
column for each retention filter is powered by the datadog.estimated_usage.apm.indexed_spans
metric, which you can use to track your indexed span usage. For more information, read Usage Metrics, or explore the out-of-the-box usage dashboard available in your account.
There are two types of retention filters:
Feature | Standard retention filters | Trace-level retention filters |
---|---|---|
Configuration | Span query + Span retention rate | Span query + Span retention rate + Trace retention rate |
What is indexed | Only spans targeted by the query | All spans belonging to traces that contain spans matching the query |
Where it is queryable | Span Explorer | Span Explorer and Trace Queries |
The following retention filters are enabled by default:
Error Default
retention filter indexes error spans with status:error
. The retention rate and the query are configurable. For example, to capture production errors, set the query to status:error, env:production
. Disable the retention filter if you do not want to capture the errors by default.Application Security Monitoring Default
retention filter is enabled if you are using Application Security Management. It ensures the retention of all spans in traces that have been identified as having an application security impact (an attack attempt).Synthetics Default
retention filter is enabled if you are using Synthetic Monitoring. It ensures that traces generated from synthetic API and browser tests remain available by default. See Synthetic APM for more information, including how to correlate traces with synthetic tests.Dynamic Instrumentation Default
retention filter is enabled if you are using Dynamic Instrumentation. It ensures spans created dynamically with Dynamic instrumentation remain available in the long term by default.The Datadog intelligent retention filter is always active for your services, and it keeps a representative selection of traces without requiring you to create dozens of custom retention filters. It is composed of:
Note: Trace Queries are based on the data indexed by the Intelligent Retention filter.
Spans indexed by the Intelligent retention filter (diversity sampling and 1% flat sampling) are not counted towards the usage of indexed spans, and so do not impact your bill.
If there are specific tags or attributes for which you want to index more spans than what the Intelligent Retention filter retains, then create your own retention filter.
Diversity sampling scans through the service entry spans and retains for 30 days:
p75
, p90
, and p95
percentile spans (and the associated trace) for each combination of environment, service, operation, and resource.The set of data captured by diversity sampling is not uniformly sampled (that is, it is not proportionally representative of the full traffic). It is biased towards errors and high latency traces.
The flat 1% sampling is a uniform 1% sample of ingested spans. It is applied based on the trace_id
, meaning that all spans belonging to the same trace share the same sampling decision.
This sampling mechanism is uniform, and it is proportionally representative of the full ingested traffic. As a result, low-traffic services and endpoints might be missing from that dataset if you filter on a short time frame.
Create custom retention filters to retain specific trace data for 15 days. Use any span tag or attribute in the filter query to target and retain the spans that matter the most to your business.
For example, you can create filters to keep all traces for:
@transaction_amount:>100
resource_name:"GET /checkout" @duration:>2s env:prod
service:delivery-api @version:v2.0
When you index a span using a retention filter:
Searchability: The indexed span can be found in Trace Explorer, dashboards, and monitored for 15 days.
Visualization context: When you click on any indexed span in the Trace Explorer, you always see its complete trace context (all parent and child spans) in flame graph or waterfall view, regardless of whether those other spans were indexed.
Search context: Although you can visualize a complete trace, only the spans that were specifically indexed by retention filters will be searchable in the Trace Explorer.
To create a retention filter:
For example, if you configure a retention filter to index spans from service:my-service
:
100%
ensures that all spans matching service:my-service
are indexed.50%
ensures that all spans from all traces with a span from service:my-service
are indexed. Assuming traces have 100 spans in average and 5 spans from service:my-service
, configuring a trace rate indexes the remaining 95 spans of the trace, for the trace rate percentage being configured.When you create a new filter or edit the retention rate of an existing filter, Datadog displays an estimate of the percentage change in global indexing volume.
Filters are retained in a serial order. If you have an upstream filter that retains spans with the resource:POST /hello_world
tag, those spans do not show up in the Edit window of a downstream filter that searches for spans with the same tag because they have been retained by the upstream filter.
By default, spans indexed by custom retention filters and the intelligent retention filter are included in the Trace Explorer aggregated views (timeseries, toplist, table), as well as in dashboards and notebook queries.
The retained_by
attribute is present on all retained spans. Its value is:
retained_by:retention_filter
if the span was captured by a custom retention filter, including the default retention filters and no trace rate was configured. These spans are not included in Trace Queries as trace queries require all spans of a trace to be indexed.retained_by:trace_retention_filter
if the span is captured by a retention filter for which a trace rate was configured.retained_by:diversity_sampling
if the span was captured by diversity sampling (part of the Intelligent retention filter).retained_by:flat_sampled
if the span was indexed by the 1% flat sampling.Spans indexed by the intelligent retention filter are excluded from APM trace analytics monitor evaluation.