Sentry JavaScript SDK v11 adds tracing for all JS platforms
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.
Related posts
- OpenTelemetry for JavaScript Observability at Zalando
Zalando Engineering mediumAdeptZalando built thin OpenTelemetry-based observability SDKs for Node.js and the browser, sharing a common API package so isomorphic apps can be instrumented consistently. The Node.js SDK autoconfigures from Kubernetes environment variables and ships default runtime metrics (CPU, memory, GC, event loop lag) plus opt-in HTTP/Express instrumentation. The browser SDK was trimmed to about 30 KB by cherry-picking packages and lazy-loading the rest. It exports telemetry via sendBeacon through the Skipper edge proxy, gated on GDPR consent, and is exposed to frontend developers through Rendering Engine renderer APIs. Key lessons include avoiding OpenTelemetry context (Zone.js in browsers, and migration friction from OpenTracing) in favour of passing spans manually, and defining custom histogram buckets so Core Web Vitals such as LCP and CLS get meaningful percentiles.
- How to get deep traces in your Node.js backend with OTel and Deno
Deno mediumAdeptRunning an unmodified Node.js Express server under Deno 2.2+ with the `--unstable-otel` flag yields OpenTelemetry traces and span-correlated logs with no code changes. Deno auto-instruments `console.log`, `fetch` and `Deno.serve()`. The comparison is a small ChatGPT-backed chat app viewed in Grafana's otel-lgtm Docker stack (Tempo for traces). The plain-Node route needed eight @opentelemetry dependencies, an 84-line telemetry.js configuring NodeSDK exporters and HTTP instrumentation, and a custom logger that attaches trace IDs. In Deno, a few environment variables are enough, though the feature is still experimental.
- Zero-config Debugging with Deno and OpenTelemetry
Deno mediumAdeptDeno's built-in OpenTelemetry support (enabled with --unstable-otel) automatically correlates console.log output with trace IDs, creates spans for incoming and outgoing HTTP requests, propagates W3C tracecontext headers across services, and records request-count and latency metrics by status code, all without code changes. The walkthrough shows why interleaved logs need request correlation and how spans and parent span IDs build a trace. It provides a withSpan helper around startActiveSpan for adding custom spans such as database calls, and contrasts automatic propagation with manually injecting traceparent headers.
- Build a dinosaur runner game with Deno, pt. 6
Deno mediumAdeptThe final stage of the Deno dinosaur runner series adds observability using Deno Deploy's built-in logs, traces and metrics dashboards. A logging middleware emits one structured JSON line per HTTP request, and route handlers log business events like score submissions and customization saves. Custom OpenTelemetry spans wrap the leaderboard, score submission and customization routes, carrying attributes, events and recorded exceptions. Platform metrics (status codes, latency, CPU, memory, GC time, bandwidth) are used to spot anomalies before drilling into traces, and the `--tunnel` flag sends local telemetry to the same dashboards for verification before deploying.
- Connect client traces to your logs
Supabase mediumAdeptsupabase-js can now propagate W3C Trace Context (traceparent, tracestate, baggage headers) to Supabase, so a client trace_id is stamped onto API Gateway and Edge Function logs and can be joined with browser spans in OpenTelemetry, Sentry, Datadog and similar tools, including via Log Drains. Setup requires your own registered TracerProvider, a separate `@supabase/supabase-js/tracing` import (keeping OpenTelemetry out of the main bundle), `tracePropagation: true`, and an active span; `respectSamplingDecision: false` forces headers for unsampled traces. Headers go only to Supabase domains, there is no CDN/UMD support, and users on 2.106.0–2.111.x must upgrade to 2.112.0+ because bundled apps silently sent no headers.