APM & Distributed Tracing Fundamentals Certification / 01 / 04

APM Fundamentals

What this domain covers

This domain covers the concepts and the big picture that you need before using Datadog APM. There are four pillars. First, why distributed tracing becomes necessary in a microservices environment (the rationale for APM). Second, the Datadog approach: how traces flow from an instrumented application to Datadog, and where ingestion and retention are controlled. Third, the building blocks of trace, span, service, and resource, plus context propagation, which passes context through HTTP headers. Fourth, how automatic instrumentation is implemented for each language, where the standard tracers and OpenTelemetry fit in, Unified Service Tagging, and the difference between the 15-minute and 15-day retention periods. The exam asks things like where a setting is controlled, what loads the SDK, and what a given period retains. Figures are based on the official documentation as of September 2026.

Topics listed in the official guide

  • APM Rationale
  • Datadog Approach to APM
  • Tracing Architectures
  • Language Level Differences (Automatic Instrumentation)
  • OOTB Tracer vs Community Tracer
  • Tagging
  • Retention Periods for APM Data

Key points

  • A trace is the unit that tracks the processing time and status of a single request, and it consists of one or more spans. A service is the structural unit that groups endpoints, queries, and jobs.
  • A resource refers to an instrumented web endpoint, database query, or background job, and is expressed as an HTTP method and route, such as GET /productpage.
  • Context propagation passes the trace ID and parent span ID downstream in HTTP headers. The default styles are Datadog, W3C Trace Context, and Baggage.
  • Ingestion volume is controlled with Ingestion Controls, and the spans retained for 15 days are controlled separately with Retention Filters. The latter does not affect the volume the Agent sends.
  • Single Step Instrumentation is the recommended way to automatically inject the SDK into processes when installing the Agent. It is automatically disabled when custom instrumentation code is detected.
  • The SSI injector loads the SDK through -javaagent in JAVA_TOOL_OPTIONS for Java and through PYTHONPATH for Python.
  • SSI on Windows supports only Java and .NET. Rust has no automatic instrumentation and is covered by manual instrumentation with the OpenTelemetry API.
  • The transport paths for OTel data are the DDOT Collector embedded in the Agent (recommended) or the OpenTelemetry Collector with the Datadog Exporter.
  • Unified Service Tagging links traces, metrics, and logs with the three reserved tags env, service, and version. version is expected to change with each deployment.
  • All ingested spans are retained for 15 minutes for Live Search, spans selected by retention filters for 15 days, and the diversity sampling portion for 30 days.

Terms and concepts

APM Rationale (Why Distributed Tracing)

In a microservices environment, a single request passes through multiple components: a web service, an authentication service, and a database. With only the metrics and logs of individual hosts, you cannot follow which operation in which service took the time. Datadog APM combines distributed tracing, out-of-the-box dashboards, and correlation with logs and RUM to help you identify bottlenecks, investigate errors, and optimize. The official documentation maps the Trace Explorer to the use case of understanding the flow of a request, and the Service page and Resource page to the use case of viewing the health of individual services.

Datadog Approach to APM (Trace Pipeline)

Traces are born in the instrumented application and flow through the Agent to Datadog. Datadog divides this flow into two stages, ingestion and retention, and lets you tune both. On the ingestion side, Ingestion Controls set sampling rates per service and resource, and the recommended design is not to miss complete traces that contain errors or high latency. After ingestion, Processing Pipelines can normalize span attributes without code changes, and finally Retention Filters decide which spans are indexed for 15 days. These filters do not affect the volume the Agent sends.

Trace, Span, Service, and Resource

A trace is the unit that tracks the processing time and status of a single request, and it consists of one or more spans. A span is a logical unit of work over a period of time. A service is the structural unit that groups endpoints, database queries, scheduled jobs, and so on, and appears as an API service, a database service, or a crond service. A resource is an individual endpoint or query within a service: for web, dynamic endpoints such as GET /productpage appear under the span name web.request, and for databases, individual queries appear under db.query.

Trace Context Propagation

To stitch spans created in separate services into a single trace, the upstream service injects the trace ID, parent span ID, and sampling decision into HTTP headers, and the downstream service extracts them and continues. When automatic instrumentation is enabled, the SDK does this automatically. The default styles are Datadog (highest priority at extraction), W3C Trace Context, and Baggage, which provides both compatibility with older SDKs and interoperability with OpenTelemetry. When multiple styles are present, they are extracted in the listed order, the trace continues with the first valid context, and the rest become span links. Baggage carries key-value pairs such as business data.

The Four Instrumentation Methods

Instrumentation is the process of adding code to an application that collects and reports observability data. Once the Datadog SDK is loaded, spans for supported frameworks are generated automatically by default (automatic instrumentation), and in many cases this is enough. There are two ways to deploy the SDK: Single Step Instrumentation, which injects the SDK at runtime with a single command and requires no code changes, and the manually managed SDK, which controls all settings through environment variables and code. There are two ways to add spans: Dynamic Instrumentation, which applies rules from the UI without redeploying, and code-based custom instrumentation, which defines spans in code with the tracing API.

How Automatic Instrumentation Works per Language (SSI Injector)

The SSI injector enters the process through LD_PRELOAD on Linux, the Admission Controller on Kubernetes, and a DLL on Windows, detects the runtime, and rewrites environment variables or arguments. Java uses -javaagent in JAVA_TOOL_OPTIONS, Python uses PYTHONPATH, Node.js uses NODE_OPTIONS, and .NET uses the CLR profiler environment variables. The work finishes before main and nothing stays resident. Windows supports only Java and .NET, and Rust has no automatic instrumentation.

Standard Tracers, Community Tracers, and OpenTelemetry

The official Datadog tracing libraries are provided per language, such as dd-trace-java and dd-trace-py, and community-built libraries fill in languages and use cases without an official one. If you need vendor neutrality, use OpenTelemetry. There are three instrumentation approaches: the OTel SDK alone, the OTel API combined with the Datadog SDK, and OTel instrumentation libraries, and the second gives access to the most Datadog features. For transport, the main options are the DDOT Collector embedded in the Agent (recommended) or the OpenTelemetry Collector.

Unified Service Tagging (env / service / version)

When the three reserved tags env, service, and version are aligned, you can move between traces, metrics, and logs using the same tags, and filter by version to compare the impact of deployments. In container environments, the DD_ENV, DD_SERVICE, and DD_VERSION environment variables are used together with Kubernetes or Docker labels, and the Admission Controller automatically injects the environment variables to match the labels. A span has exactly one service, and DD_VERSION is attached only to spans belonging to that SDK's service.

Retention Periods for APM Data (15 Minutes, 15 Days, and 30 Days)

All ingested spans are available for Live Search and analytics for 15 minutes. After that, only the spans matching a retention filter are indexed and searchable for 15 days. There are three kinds of filters: the always-on Intelligent Retention Filter, default filters such as Error Default, and custom filters with arbitrary tag conditions, and the order of the list is the evaluation order. Diversity sampling retains representative examples for 30 days for each combination of env, service, operation, and resource, and, together with the 1% uniform sampling portion, is not counted toward billable usage.

Check your understanding

Check what you have learned with 5 questions