RousselTMLEARNING

Article · Datadog: from discovery to expertise

APM and OpenTelemetry

1. Instrumenting #

Three options.

Choosing #

MethodPrincipleWhen
Single Step InstrumentationThe agent (or operator) automatically injects the libraries when processes startQuickly covering a whole host or cluster
dd-trace librariesA library per language, started with the applicationFine control, full Datadog features
OpenTelemetryOTel SDK, OTLP sent to the agent or the CollectorVendor neutrality
pip install ddtrace
DD_SERVICE=checkout DD_ENV=prod DD_VERSION=2.4.1 DD_LOGS_INJECTION=true DD_AGENT_HOST=localhost \
  ddtrace-run gunicorn app:app

OpenTelemetry to Datadog #

# datadog.yaml : l'agent reçoit l'OTLP
otlp_config:
  receiver:
    protocols:
      grpc: { endpoint: 0.0.0.0:4317 }
      http: { endpoint: 0.0.0.0:4318 }

Applications instrumented with OpenTelemetry send to the agent (ports 4317/4318); the deployment.environment, service.name and service.version attributes are converted to env, service and version.

2. Using APM #

Services, traces, profiles.

Views #

ViewUsage
Software Catalog / ServicesHealth of each service, owners, documentation
Service pageThroughput, errors, latency per resource; deployments (version tag)
Service MapObserved dependencies
Trace ExplorerSpan search by attributes, analytics
Continuous ProfilerCPU and memory profiles linked to traces
Error TrackingErrors grouped by cause
Good to know: Trace retention relies on ingestion sampling and retention filters: not all traces are kept for 15 days, only those retained by the filters (errors, slow traces, sample).

3. Linking logs and traces #

One click from one signal to the other.

Correlation #

With DD_LOGS_INJECTION=true, the library adds dd.trace_id and dd.span_id to logs; Datadog shows the logs of a trace and the trace of a log.

2026-10-19 10:00:00 ERROR [dd.service=checkout dd.env=prod dd.version=2.4.1 dd.trace_id=5735239282836592 dd.span_id=1234567] Paiement refusé
Good practice: If logs are in JSON, the dd.* attributes are recognized directly; otherwise, add them to the log format and extract them in the pipeline.

📄 Datadog APM and OpenTelemetry: traces, services and correlation with logs →

My progress

  • ⏱ Estimated time : ≈ 4 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

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

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

Elastic Observability: logs, infrastructure, APM and synthetics

Elastic Observability features: log exploration, infrastructure inventory with Elastic Agent and ...

Datadog on Kubernetes: Operator, Cluster Agent and Autodiscovery

Monitor Kubernetes with Datadog: the Datadog Operator and the DatadogAgent resource, Cluster Agen...

Datadog: the SaaS observability platform at a glance

What Datadog is, its products (infrastructure, logs, APM, RUM, synthetics, security), its concept...

OpenTelemetry traces in Elasticsearch and Kibana APM

Instrument applications with OpenTelemetry or EDOT SDKs, send traces to Elasticsearch, get Kibana...

Logs with OpenTelemetry: data model, appenders, correlation and collection

Master the log signal: the LogRecord data model, the Logs Bridge API and appenders (Logback, Log4...

Correlating traces, metrics, logs and profiles with OpenTelemetry

Link the four signals to diagnose quickly: shared resource, trace_id in logs, exemplars on metric...

Profiles, OpenTelemetry's fourth signal: continuous profiling and correlation with traces

Understand OpenTelemetry's new profile signal: continuous profiling, flame graphs, data model and...

OpenTelemetry and Dynatrace: OTLP, collector and instrumentation

Integrate OpenTelemetry with Dynatrace: OTLP endpoint and tokens, Dynatrace OTel Collector, trace...

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!