---
title: "Connect client traces to your logs"
description: "supabase-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."
url: "https://swe.quest/articles/connect-client-traces-to-your-logs-499f3b0db3b62deb"
canonical: "https://supabase.com/blog/connect-client-traces-to-your-logs"
source: "Supabase"
published: "2026-08-18"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 3
tags: ["observability","javascript"]
---

# Connect client traces to your logs

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2026-08-18, 3 min read, Announcement. Original: [https://supabase.com/blog/connect-client-traces-to-your-logs](https://supabase.com/blog/connect-client-traces-to-your-logs)

## Summary

supabase-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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- OpenTelemetry tracing basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- W3C Trace Context

## Keywords

supabase-js, W3C Trace Context, OpenTelemetry, Supabase Edge Functions, Log Drains, traceparent

## Related posts

- [Zero-config Debugging with Deno and OpenTelemetry](https://swe.quest/articles/zero-config-debugging-with-deno-and-opentelemetry-84e6e1786536c301.md): Deno · 2025-04-09 · Medium · 9 min read · Observability, Debugging, Runtimes & VMs, TypeScript
  Deno'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.
- [Sentry JavaScript SDK v11 adds tracing for all JS platforms](https://swe.quest/articles/sentry-javascript-sdk-v11-adds-tracing-for-all-js-platforms-2ee0190e0544fb8c.md): Sentry · 2026-10-09 · Medium · 12 min read · Observability, JavaScript, Build systems, Runtimes & VMs
  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.
- [Logs, Metrics, and Traces: What Does Each Signal Tell You?](https://swe.quest/articles/logs-metrics-and-traces-what-does-each-signal-tell-you-3a828a88ec5fbd9a.md): Railway · 2025-11-07 · Easy · 8 min read · Observability, Incidents & postmortems
  Logs, metrics and traces answer different questions: metrics show when behaviour changed, traces show where in the service graph a request slowed or failed, and logs explain why.
- [Logging, Metrics, and Distributed Tracing in .NET with OpenTelemetry and ClickStack](https://swe.quest/articles/logging-metrics-and-distributed-tracing-in-net-with-opentelemetry-and-clickstack-1c8d1423c6d63948.md): ClickHouse · 2026-06-03 · Medium · 12 min read · Observability, .NET, SQLite
  Two ASP.NET services (an Order API and a Payment Service backed by SQLite via EF Core) are instrumented with OpenTelemetry and export traces, logs and metrics over OTLP/gRPC to ClickStack, a ClickHouse-based observability stack run in Docker Compose.
- [Logs and tracing: not just for production, local development too](https://swe.quest/articles/logs-and-tracing-not-just-for-production-local-development-too-cd937ebe394aa48b.md): incident.io · 2021-11-11 · Medium · 5 min read · Observability, Go, Developer productivity, Cloud platforms
  A small team wired its Go app to Google Cloud Trace via the OpenCensus Stackdriver exporter, then teed zap logs to both STDERR and Cloud Logging with trace and span IDs attached, so logs appear inline with traces.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
