Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Datadog Engineering 8 min read Case study mediumAdept

How Datadog resolves evolving OpenTelemetry semantics at query time

Datadog's Semantic Core is a knowledge graph that encodes equivalences between Datadog-native and OpenTelemetry metrics and span attributes, including deprecation chains across OTel convention versions. Its edges also carry correctness conditions such as tag filters, unit scaling and metric-type constraints, for example `system.cpu.utilization{state:user}` scaled by 100 to match `system.cpu.user`. A precomputed equivalence configuration lets the Semantics SDK rewrite queries in memory (OR expansion plus result normalization back to the query's vocabulary) without per-query graph lookups. Correctness is checked by an external end-to-end validator that runs the same scenarios across OTel-only, Datadog-only and hybrid setups and flags result mismatches to the owning teams.

Related posts

  • Migrate Datadog telemetry with the OpenTelemetry Collector

    ClickHouse mediumAdept

    The OpenTelemetry Collector's Datadog receiver lets existing Datadog agents and SDKs send logs, traces and metrics to a Collector. The Collector translates them into the OpenTelemetry data model, and they can then be exported to any backend or dual-written alongside Datadog for side-by-side evaluation. ClickHouse contributed fixes upstream: proper log timestamps and severity mapping, promotion of resource attributes, reconstruction of 128-bit trace IDs for log-trace correlation, in-Collector JSON log decoding, and Zstandard support for Datadog Agent 7.59+. A worked example points a Datadog agent's datadog.yaml at ClickStack's Collector on port 8126. The receiver is still alpha: it is recommended for evaluating logs and traces, while metrics support covers only the v1/v2 intake endpoints and needs more testing.

  • Naming is hard, semantics are hard(er): Inside Sentry Conventions

    Sentry mediumAdept

    Sentry Conventions is a superset of OpenTelemetry Semantic Conventions that defines attribute names, types, scrubbing policies, deprecation chains, span ops, span naming rules and metric specs across Sentry's ~100 SDKs, its Relay ingestion service, Snuba querying and the product UI. The spec grew from about 300 to over 900 attributes in a year. It ships as NPM, PyPI and Rust packages so SDKs avoid hard-coded strings. Relay uses it to scrub data and infer span names and descriptions, and Snuba coalesces deprecated and current attributes so queries like `http.request.method` also match the old `http.method`. The main lessons are to specify attributes before shipping them, treat deprecations as part of the spec, and test conventions automatically for consistency.

  • Shifting Metrics Right

    Honeycomb mediumAdept

    Instead of pre-aggregating metrics inside applications, generate them as late as responsibly possible in the telemetry pipeline, either in the OpenTelemetry Collector or in the backend from traces and logs. The argument separates measurements (questions you want answered) from metrics (a pre-aggregated storage type). It claims the accuracy loss from sampling is negligible: one customer's sampled, trace-derived metrics were within 0.001% of their pre-aggregated data at a fraction of the cost. In-app aggregation buffers data for 10 to 60 seconds and can silently lose datapoints on a crash. A signaltometrics connector config shows how to derive HTTP semantic-convention exponential histograms from spans using AdjustedCount to account for sampling.

  • Authors' Cut—Debugging with the Core Analysis Loop, and What to Build vs Buy

    Honeycomb easyNovice

    Modern complex systems rarely fail the same way twice, so debugging should proceed from first principles via the Core Analysis Loop: establish what you know, prove or disprove a hypothesis with a graph, look for outliers and correlations to explain why, and repeat until causes are clear. Supporting that iterative, ad-hoc exploration requires an observability datastore that returns queries in seconds, makes every field queryable, keeps unaggregated events, doesn't privilege particular dimensions, exposes fresh data within seconds, and stays durable, which in practice points to columnar stores over time series databases. The build-vs-buy decision should weigh full costs including infrastructure and opportunity cost, with extensible vendor tools as a possible middle ground.

  • How we measure data completeness at scale

    Datadog Engineering mediumAdept

    Datadog measures ingestion data completeness per customer by splitting pipelines into segments and recording create and acknowledgment events keyed by unique payload IDs in 60-second time buckets. This makes counts idempotent under retries and reordering. Watermarks were rejected because customers can send arbitrarily delayed data and pipelines contain loops and replays. Segment ratios are multiplied along sequential paths and volume-weighted across parallel branches. Cost and resilience come from per-customer sampling driven by a two-stage load-shedding bulletin, a custom lock-free in-memory store with a worker-per-shard design, and no dependency on Kafka or external databases, so the system kept running through a Kafka incident.

The quest for software engineering knowledge.

Look:
Layout: