Updated 30 Aug 2026: Updates Supabase tracing for supabase-js 2.112.3: unsampled requests now retain traceparent for log correlation, new diagnostics expose bad/missing tracing setup, and browser-to-Edge-Function tracing requires updated CORS headers/redeployment.

Key details

  1. Supabase client tracing propagates W3C `traceparent`, `tracestate` and `baggage` into supported Supabase requests.
  2. supabase-js 2.106.0 through 2.111.x silently failed to propagate headers in bundled apps; 2.112.0+ with the tracing subpath is the supported path.
  3. From supabase-js 2.112.3, unsampled requests still send `traceparent` by default, preserving trace-ID log correlation while omitting `tracestate` and `baggage`.
  4. Before 2.112.3, `respectSamplingDecision: true` could skip all trace headers for unsampled traces.
  5. Version 2.112.3 adds one-time warnings for tracing configurations that cannot emit `traceparent`.
  6. Browser calls to Edge Functions require CORS allowlists that permit `traceparent`, `tracestate` and `baggage`; Supabase’s current SDK CORS helper includes them from 2.112.3.
  7. Current backend correlation remains focused on API Gateway and Edge Function logs.
  8. Trace propagation remains opt-in and requires a real active span plus a registered tracing provider.

What builders should take away

  1. Upgrade tracing-enabled applications to supabase-js 2.112.3 or later so unsampled requests retain trace IDs and newer diagnostics catch common setup mistakes.
  2. If you invoke Edge Functions from a browser, update the function’s CORS headers to include W3C trace context and redeploy; otherwise the browser can block the propagated headers before Supabase sees them.
  3. Keep normal sampling policies unless you specifically need full downstream baggage/tracestate on unsampled requests; trace-ID correlation no longer requires forcing everything to sampled.
  4. Watch for the SDK’s one-time tracing warnings in test environments and fail observability smoke tests when trace IDs do not appear in matching Supabase logs.
  5. Continue treating telemetry produced on supabase-js 2.106.0–2.111.x as potentially incomplete if tracing was expected to be active.
  6. Document the current service boundary: API Gateway and Edge Function logs support correlation today, but not every Supabase subsystem participates in one full distributed trace.

What changed

Supabase’s original August 18 tracing release linked supported client traces to API Gateway and Edge Function logs but had an important sampling limitation: before supabase-js 2.112.3, an unsampled upstream trace could result in no trace headers being sent at all. Current Supabase documentation now states that from 2.112.3 onward, non-sampled requests still carry `traceparent` with the sampling flag preserved, while `tracestate` and `baggage` remain suppressed by default. That keeps backend log correlation working without forcing full sampling. The newer SDK also emits one-time warnings for several propagation misconfigurations, and Supabase’s browser Edge Function guidance now requires CORS allowlists to include `traceparent`, `tracestate` and `baggage`; functions using older SDK-derived CORS headers need to update and redeploy.

Why it matters

Distributed tracing is only useful when the identifier survives the boundary developers are trying to debug. The 2.112.3 behavior means teams can keep normal sampling policies while still correlating a browser request to Supabase backend logs, instead of choosing between sampling cost and trace-ID continuity. The new diagnostics also reduce the risk of believing tracing is working when no active span, tracing runtime or compatible propagator is actually present. For browser-to-Edge-Function calls, however, the fix introduces an operational migration detail: old CORS allowlists can block the new W3C headers until the function is redeployed with an updated allowlist.

Unsampled requests now keep enough context for log correlation

As of supabase-js 2.112.3, the default `respectSamplingDecision: true` behavior no longer drops all tracing headers for an unsampled upstream span. The SDK sends `traceparent` with the sampled flag preserved and omits `tracestate` and `baggage`. Supabase can therefore stamp the same trace ID into backend logs even though downstream tracing systems correctly treat the span as unsampled.

The original silent-failure window still matters

supabase-js 2.106.0 through 2.111.x silently failed to propagate trace headers in bundled applications when the OpenTelemetry API was unavailable. The supported path remains 2.112.0 or later with an explicit `@supabase/supabase-js/tracing` import. Teams that enabled tracing on affected versions should continue treating historical trace continuity as incomplete.

2.112.3 makes bad tracing setup more visible

The current SDK documents one-time warnings when tracing is enabled but the runtime is not loaded or when the active propagator does not emit W3C `traceparent`. This preserves Supabase’s non-throwing behavior while making common configuration mistakes easier to diagnose from the browser or server console.

Browser Edge Function calls need trace headers in CORS

Browser requests to Edge Functions can only carry the tracing headers if the function’s CORS allowlist permits them. Supabase says the SDK-provided `corsHeaders` includes `traceparent`, `tracestate` and `baggage` from version 2.112.3. Functions deployed with older allowlists need to update the dependency or add the headers manually and redeploy before browser trace propagation will work.

Server-side coverage remains targeted rather than universal

The trace ID is currently surfaced in API Gateway and Edge Function logs, and the SDK only attaches trace context to Supabase project domains and local development hosts. Database, Auth, Storage and Realtime logging do not yet form one universal end-to-end trace surface, so builders should still document exactly which service boundaries can be correlated.

What to watch next

  • Whether Supabase extends propagated trace IDs into Auth, Storage, Realtime and database logs.
  • Whether the tracing subpath and explicit OpenTelemetry wiring become part of a simpler stable SDK integration.
  • Further changes to sampling semantics or propagation diagnostics after 2.112.3.
  • Whether Supabase adds an automated check for Edge Function CORS compatibility when client trace propagation is enabled.
  • A formal incident/root-cause write-up for the earlier 2.106.0–2.111.x silent propagation failure.

Still unclear

  • Supabase’s tracing path still no-ops rather than throwing when no active span or provider exists, so warnings and explicit smoke tests remain important.
  • The 2.112.3 change preserves trace-ID correlation for unsampled spans but deliberately does not send the full `tracestate` and `baggage` context by default.
  • Current server-side trace correlation does not cover every Supabase product surface.
  • CORS requirements only affect browser cross-origin Edge Function calls; server-to-server paths have different enforcement.

Sources

Direct reading behind this dossier.

3 sources
Client-side tracing
Supabase Docs primary_documentation

Current 2.112.3 sampling semantics, warnings, setup and troubleshooting guidance.

Discussion

Discussion is reader-contributed. Comments are not part of the BTN dossier or its editorial evidence.

0 visible comments

Join the discussion

Keep comments useful and relevant. Reader contributions may be moderated and are not BTN editorial evidence.

Sign in to comment