RousselTMLEARNING

Article · Datadog: from discovery to expertise

Advanced APM: sampling and profiler

1. Ingestion and retention #

Two levels of control.

Principle #

Trace ingestion and retention
  • Trace metrics (hits, errors, latency per resource) are computed on all traffic, whatever the sampling.
  • Sampling rules (DD_TRACE_SAMPLING_RULES variable or remote configuration) decide which traces are ingested.
  • Retention filters choose the spans indexed for 15 days: by default errors, high latencies and a diverse sample.
export DD_TRACE_SAMPLING_RULES='[{"service":"shop","name":"http.request","sample_rate":0.2},{"service":"shop","resource":"GET /health","sample_rate":0}]' 

2. Profiler and dynamic instrumentation #

Beyond traces.

Tools #

ToolBringsUsage
Continuous ProfilerCPU, memory, locks per function, continuouslyFind the expensive function behind a slow endpoint
Code HotspotsLink between a span and the profile during that spanExplain the latency of a specific request
Dynamic InstrumentationAdd a log or a metric to the code in production, without redeployingInvestigate a rare bug
Error TrackingGrouping errors into issuesPrioritize fixes

3. Software Catalog #

Who owns what.

Service ownership #

The Software Catalog (formerly Service Catalog) lists services with their team, on-call, repositories, runbooks and criticality level, described in a file versioned with the code:

# service.datadog.yaml
apiVersion: v3
kind: service
metadata:
  name: shop
  owner: team-commerce
  links:
    - { name: Runbook, type: runbook, url: https://wiki.example.com/shop }
spec:
  lifecycle: production
  tier: "1"
Good practice: A service without an owner is an incident without anyone responsible: make the catalog entry a prerequisite for going to production.

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

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

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

Instrument applications for Datadog APM (dd-trace, single step instrumentation, OpenTelemetry), u...

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,...

Advanced infrastructure with Datadog: network, cloud, containers and databases

Monitor infrastructure beyond hosts: Network Performance Monitoring, AWS, Azure and GCP integrati...

Grafana Tempo best practices: instrumentation, sampling, queries and costs

Tempo best practices: attribute conventions, useful instrumentation, sampling, using TraceQL, cor...

Datadog: the SaaS observability platform at a glance

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

Advanced Datadog metrics: types, aggregations, cardinality and Metrics without Limits

Master Datadog metrics: types (count, rate, gauge, histogram, distribution), time and space aggre...

Dynatrace vs Datadog: the duel of the APM leaders

A complete comparison between the two observability giants: AI-driven automation versus flexibili...

Datadog on Kubernetes: Operator, Cluster Agent and Autodiscovery

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

RUM and Synthetic Monitoring with Datadog: synthetic transaction monitoring and user experience

Measure user experience with Datadog: browser and mobile RUM, Core Web Vitals, Session Replay, li...

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!