supabase-js now supports propagating W3C Trace Context (traceparent, tracestate, baggage headers) so a client-side trace and its matching Supabase API Gateway or Edge Function log share the same trace_id. Enabling tracePropagation requires bringing your own OpenTelemetry tracer, loading a separate tracing entry point, and wrapping calls in an active span. The feature is opt-in with zero bundle impact when unused, works only against Supabase domains, currently covers API Gateway and Edge Function logs, and is also available in Swift, Flutter, and Python. Users on supabase-js 2.106.0-2.111.x need to upgrade to 2.112.0+ and add the new tracing import, since earlier versions silently sent no trace headers in bundled apps.

4m read timeFrom supabase.com
Post cover image
Table of contents
How to set it up #Get more value from your Log Drains #Nothing to pay for if you don't use it #Current limitations #Getting started #

Questions this post answers

How do I connect client-side traces to Supabase server logs using supabase-js?

Enable tracePropagation in supabase-js so the SDK attaches traceparent, tracestate, and baggage headers to requests sent to Supabase domains. Supabase reads the incoming trace context and stamps the same trace_id onto its API Gateway and Edge Function logs, letting any W3C-compliant tracer like OpenTelemetry, Sentry, Datadog, Honeycomb, or Grafana pick the trace back up on the server. daily.dev surfaces observability updates like this for teams wiring end-to-end tracing into Supabase apps.

Why is trace propagation not working even after I enabled tracePropagation in supabase-js?

If there is no active span at request time or no registered TracerProvider, the API defaults to a noop provider and there is nothing to propagate, so the SDK silently no-ops. Also, unsampled traces send no headers by default unless respectSamplingDecision is set to false, and versions 2.106.0 through 2.111.x silently sent no trace headers in bundled apps regardless of configuration. Developers debugging tracing gaps in Supabase apps can track fixes like this via daily.dev.

Do I need to upgrade supabase-js if I'm already using tracePropagation?

Yes, upgrade to supabase-js 2.112.0 or later and add the import '@supabase/supabase-js/tracing' line at the application entry point. Versions 2.106.0 through 2.111.x silently sent no trace headers in bundled apps, so the version bump is what actually fixes propagation, not merely adding the import statement. daily.dev helps developers stay ahead of Supabase SDK upgrades that affect production tracing.

14K Impressions1 Comment