Skip to content

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

Sentry 7 min read Case study mediumAdept

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

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.

Related posts

  • How Datadog resolves evolving OpenTelemetry semantics at query time

    Datadog Engineering mediumAdept

    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.

  • Sentry JavaScript SDK v11 adds tracing for all JS platforms

    Sentry mediumAdept

    Sentry's JavaScript SDK v11 replaces OpenTelemetry export-patching instrumentations (require-in-the-middle, import-in-the-middle, shimmer) with a source-code transformer that injects node:diagnostics_channel tracingChannel calls into library functions, plus integrations that subscribe to those channels and emit Sentry spans. Because the transform rewrites source rather than mutating exports, it runs both at runtime via Module.registerHooks and at build time via Vite, Rollup, webpack, esbuild and bun build plugins. That makes bundled deployments, Cloudflare Workers, Deno and Bun traceable and removes preload hacks and most OpenTelemetry dependencies. Caveats: load order still matters, --require is dropped, instrumented libraries must not be externalized, Bun runtime hooks are blocked by a CJS export bug, and debug: true reports what got injected.

  • Making Rust observability reliable at scale with OpenTelemetry

    Datadog Engineering mediumAdept

    Datadog built dd-trace-rs, an opinionated Rust tracer on top of the OpenTelemetry Rust SDK, to fix fragmented traces, inconsistent sampling and context loss across Rust services. Upstream, they rewrote OpenTelemetry's active-context slot as a stack that tolerates out-of-order and overlapping scopes, which made some context operations 2–4x faster. They also fixed the tracing-opentelemetry bridge and a tracing subscriber callback bug so OpenTelemetry spans attach correctly inside tracing spans. On the Datadog side, a custom sampler defers keep/drop decisions and a span processor flushes whole trace chunks, emitting statistics for dropped spans; together these cut ingestion volume 20x while tripling indexed spans per service.

  • Why (and how) GitHub is adopting OpenTelemetry

    GitHub Engineering mediumAdept

    GitHub is standardizing on OpenTelemetry to replace a patchwork of statsd dialects, syslog-format logs and OpenTracing traces that made cross-signal correlation hard and forced repeated instrumentation work. The initial focus is tracing as the root signal, from which metrics, logs and exception reports can be derived and correlated via trace IDs injected into log lines. Opinionated internal helper libraries and community auto-instrumentation for Rails, PG, ActiveJob and HTTP clients give quick wins. Ruby config examples show a no-op span exporter for tests and a few `c.use` lines that surface slow database calls.

  • Observability as a superpower

    incident.io mediumAdept

    Distributed tracing with OpenTelemetry lets incident.io engineers spot bugs before customers report them, by showing each request's route as a tree of timed spans that exposes slow steps, N+1 queries and duplicate calls. The team gets spans for free from instrumented database and HTTP clients, follows a consistent span naming convention, and tags spans with metadata such as table names, row counts, query fingerprints and org IDs. In Go, an internal library plus a defer-with-named-return pattern records errors on spans automatically. Traces go to Cloud Trace locally and to Grafana Tempo in production, where TraceQL queries power debugging. Trace URLs are threaded into logs, Sentry errors and response headers, with a caution that span and attribute volume drives storage cost.

The quest for software engineering knowledge.

Look:
Layout: