feat(supabase): add tracing integration - #9812
Conversation
Overall package sizeSelf size: 8.22 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.72 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 68533dd | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9812 +/- ##
==========================================
+ Coverage 98.52% 98.53% +0.01%
==========================================
Files 975 986 +11
Lines 142737 144749 +2012
Branches 12717 12783 +66
==========================================
+ Hits 140628 142632 +2004
- Misses 2109 2117 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-08-14 16:21:33 Comparing candidate commit 68533dd in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2310 metrics, 48 unstable metrics.
|
What does this PR do?
Adds automatic tracing for the Supabase JavaScript client and its delegated packages:
GoTrueClient.getUser)FunctionsClient.invoke)PostgrestBuilder.then)RealtimeChannel.send)StorageBucketApi.listBucketsand authenticated storage fetches)The integration uses Orchestrion-generated CJS/ESM hooks and a conventional composite dd-trace plugin. Supabase spans use the active context, so serverless applications preserve their AWS Lambda, Azure Functions, or other platform invocation root.
This also adds plugin registration, configuration, supported-version metadata, API docs, and a focused CI job.
Motivation
Serverless applications commonly use Supabase for database, auth, storage, realtime, and function calls. Instrumenting these operations as child spans gives users end-to-end visibility beneath the platform-owned invocation root without adding a separate serverless tracing architecture or changing application return and flush behavior.
Additional Notes
This is a draft for maintainer review of the generated instrumentation points, naming, and test coverage.
Verification completed by the workflow:
@supabase/supabase-js@2.112.2The local lint command is currently blocked by a pre-existing dependency mismatch in the reused worktree (
eslint-plugin-unicorndoes not provideiteration-fallback-style).Agent session
bin/dd-apm serverless-native '@supabase/supabase-js' --runner codex --model openai/gpt-5.6-solGenerated with APM Instrumentation Toolkit