Repository navigation
feat(supabase): move OpenTelemetry tracing to opt-in /tracing subpath - #2583
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe tracing integration now uses an explicit Sequence Diagram(s)sequenceDiagram
participant Application
participant SupabaseTracing
participant Registry
participant FetchWithAuth
participant OpenTelemetry
Application->>SupabaseTracing: import tracing subpath
SupabaseTracing->>OpenTelemetry: obtain context and propagation
SupabaseTracing->>Registry: register extractor
Application->>FetchWithAuth: issue Supabase request
FetchWithAuth->>Registry: retrieve extractor
FetchWithAuth->>OpenTelemetry: inject active context
OpenTelemetry-->>FetchWithAuth: return trace headers
FetchWithAuth-->>Application: send request with propagated headers
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@supabase/auth-js
@supabase/functions-js
@supabase/postgrest-js
@supabase/realtime-js
@supabase/storage-js
@supabase/supabase-js
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/supabase-js/test/unit/fetch.test.ts`:
- Line 596: Update the three console.warn spy setups in the fetch tests to use
non-empty mock implementations, including the instances near lines 596, 624, and
646, so they satisfy the no-empty-function ESLint rule while preserving the
existing spy behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c2f6fca1-4320-4aa7-bbbb-a3755a640c0d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (22)
packages/core/supabase-js/README.mdpackages/core/supabase-js/jsr.jsonpackages/core/supabase-js/package.jsonpackages/core/supabase-js/src/SupabaseClient.tspackages/core/supabase-js/src/lib/fetch.tspackages/core/supabase-js/src/lib/tracingRegistry.tspackages/core/supabase-js/src/lib/types.tspackages/core/supabase-js/src/tracing.tspackages/core/supabase-js/test/bundle-hermes-compat.test.cjspackages/core/supabase-js/test/module-resolution-tracing.test.cjspackages/core/supabase-js/test/module-resolution-tracing.test.mjspackages/core/supabase-js/test/types/tracing.test-d.tspackages/core/supabase-js/test/unit/fetch.test.tspackages/core/supabase-js/test/unit/tracing.test.tspackages/core/supabase-js/tsdown.config.tspackages/shared/tracing/README.mdpackages/shared/tracing/package.jsonpackages/shared/tracing/src/create-extractor.tspackages/shared/tracing/src/extract.tspackages/shared/tracing/src/index.tspackages/shared/tracing/test/create-extractor.test.tspackages/shared/tracing/test/extract.test.ts
💤 Files with no reviewable changes (3)
- packages/shared/tracing/test/extract.test.ts
- packages/shared/tracing/package.json
- packages/shared/tracing/src/extract.ts
## What kind of change does this PR introduce? Documentation update for `apps/docs/content/guides/monitoring-and-debugging/client-side-tracing.mdx`. As of `@supabase/supabase-js` 2.112.0 (supabase/supabase-js#2583), the OpenTelemetry integration moved out of the main bundle into an opt-in subpath. Enabling trace propagation now takes two steps: `import '@supabase/supabase-js/tracing'` at the application entry point, plus the existing `tracePropagation: true` client option. Guide changes: - Requirements: documents the subpath import (2.112.0+), the loud-resolution behavior when `@opentelemetry/api` is missing, the one-time warning when the runtime isn't loaded, the version note for 2.106.0–2.111.x (no import there), and that the CDN/UMD build does not support tracing. - Both code samples now start with the subpath import. - Troubleshooting: new first check (runtime not loaded → one-time console warning), updated `@opentelemetry/api` semantics per version, new CDN/UMD entry. The JS reference (`typeSpec.json`) is regenerated automatically by the docs-update pipeline from the supabase-js spec and is not touched here. **Timing note:** merge once 2.112.0 is promoted to `latest` (currently on `beta`/`canary`) so the guide doesn't get ahead of the stable release. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated client-side tracing guidance for `@supabase/supabase-js` 2.112.0 and later. * Added setup examples for the required one-time opt-in import. * Clarified behavior when tracing dependencies are missing and documented CDN usage limitations. * Expanded troubleshooting guidance for runtime loading, module resolution, and UMD usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR updates `@supabase/supabase-js` to v2.112.3. **Source**: manual --- ## Release Notes ## v2.112.3 ## 2.112.3 (2026-08-11) ### 🩹 Fixes - **supabase:** add trace context headers to canonical CORS allow-list ([#2603](supabase/supabase-js#2603)) - **supabase:** improve trace propagation sampling and diagnostics ([#2604](supabase/supabase-js#2604)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini ## v2.112.2 ## 2.112.2 (2026-08-06) ### 🩹 Fixes - **realtime:** prevent duplicate on bindings ([#2594](supabase/supabase-js#2594)) - **realtime:** clear stale join payload on sign-out ([#2597](supabase/supabase-js#2597)) ### ❤️ Thank You - Filipe Cabaço @filipecabaco - Vaibhav @7ttp ## v2.112.1 ## 2.112.1 (2026-08-05) ### 🩹 Fixes - **auth:** preserve 5xx error message ([#2587](supabase/supabase-js#2587)) - **realtime:** ensure setAuth doesn't disable token refresh ([#2592](supabase/supabase-js#2592)) ### ❤️ Thank You - Eduardo Gurgel - Vaibhav @7ttp ## v2.112.0 ## 2.112.0 (2026-08-03) ### 🚀 Features - **supabase:** move OpenTelemetry tracing to opt-in /tracing subpath ([#2583](supabase/supabase-js#2583)) ### 🩹 Fixes - **auth:** accept uppercase UUIDs in validateUUID ([#2467](supabase/supabase-js#2467)) - **postgrest:** honour throwOnError when maybeSingle finds multiple rows ([#2580](supabase/supabase-js#2580)) - **storage:** resolve createSignedUrls return type mismatch ([#2474](supabase/supabase-js#2474)) - **storage:** expose service error code on StorageApiError ([#2537](supabase/supabase-js#2537)) - **supabase:** forward db retry option ([#2571](supabase/supabase-js#2571)) ### ❤️ Thank You - Anubhav Anand @i-anubhav-anand - Gourab Singha @gourabsingha1 - Juhef @juheff - Katerina Skroumpelou @mandarini - Thribhuvan - Vaibhav @7ttp - Zuhef Ahmed @Zuhef This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
This PR updates @supabase/*-js libraries to version 2.112.3. **Source**: manual **Changes**: - Updated @supabase/supabase-js to 2.112.3 - Updated @supabase/auth-js to 2.112.3 - Updated @supabase/realtime-js to 2.112.3 - Updated @supabase/postgest-js to 2.112.3 - Refreshed pnpm-lock.yaml --- ## Release Notes ## v2.112.3 ## 2.112.3 (2026-08-11) ### 🩹 Fixes - **supabase:** add trace context headers to canonical CORS allow-list ([#2603](supabase/supabase-js#2603)) - **supabase:** improve trace propagation sampling and diagnostics ([#2604](supabase/supabase-js#2604)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini ## v2.112.2 ## 2.112.2 (2026-08-06) ### 🩹 Fixes - **realtime:** prevent duplicate on bindings ([#2594](supabase/supabase-js#2594)) - **realtime:** clear stale join payload on sign-out ([#2597](supabase/supabase-js#2597)) ### ❤️ Thank You - Filipe Cabaço @filipecabaco - Vaibhav @7ttp ## v2.112.1 ## 2.112.1 (2026-08-05) ### 🩹 Fixes - **auth:** preserve 5xx error message ([#2587](supabase/supabase-js#2587)) - **realtime:** ensure setAuth doesn't disable token refresh ([#2592](supabase/supabase-js#2592)) ### ❤️ Thank You - Eduardo Gurgel - Vaibhav @7ttp ## v2.112.0 ## 2.112.0 (2026-08-03) ### 🚀 Features - **supabase:** move OpenTelemetry tracing to opt-in /tracing subpath ([#2583](supabase/supabase-js#2583)) ### 🩹 Fixes - **auth:** accept uppercase UUIDs in validateUUID ([#2467](supabase/supabase-js#2467)) - **postgrest:** honour throwOnError when maybeSingle finds multiple rows ([#2580](supabase/supabase-js#2580)) - **storage:** resolve createSignedUrls return type mismatch ([#2474](supabase/supabase-js#2474)) - **storage:** expose service error code on StorageApiError ([#2537](supabase/supabase-js#2537)) - **supabase:** forward db retry option ([#2571](supabase/supabase-js#2571)) ### ❤️ Thank You - Anubhav Anand @i-anubhav-anand - Gourab Singha @gourabsingha1 - Juhef @juheff - Katerina Skroumpelou @mandarini - Thribhuvan - Vaibhav @7ttp - Zuhef Ahmed @Zuhef ## v2.111.0 ## 2.111.0 (2026-07-28) ### 🚀 Features - **auth:** store PKCE verifiers in per-flow slots to survive overlapping flows ([#2569](supabase/supabase-js#2569)) ### ❤️ Thank You - Katerina Skroumpelou @mandarini This PR was created automatically. Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
 <h3>Snyk has created this PR to upgrade @supabase/supabase-js from 2.112.0 to 2.112.2.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **6 versions** ahead of your current version. - The recommended version was released **21 days ago**. #### Breaking Change Risk  > **Notice:** This assessment is enhanced by AI. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@supabase/supabase-js</b></summary> <ul> <li> <b>2.112.2</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.2">2026-08-06</a></br><h2>2.112.2 (2026-08-06)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>realtime:</strong> prevent duplicate on bindings (<a href="https://redirect.github.com/supabase/supabase-js/pull/2594" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2594/hovercard">#2594</a>)</li> <li><strong>realtime:</strong> clear stale join payload on sign-out (<a href="https://redirect.github.com/supabase/supabase-js/pull/2597" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2597/hovercard">#2597</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Filipe Cabaço <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/filipecabaco/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/filipecabaco">@ filipecabaco</a></li> <li>Vaibhav <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/7ttp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/7ttp">@ 7ttp</a></li> </ul> </li> <li> <b>2.112.2-canary.1</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.2-canary.1">2026-08-06</a></br><h2>2.112.2-canary.1 (2026-08-06)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>realtime:</strong> clear stale join payload on sign-out (<a href="https://redirect.github.com/supabase/supabase-js/pull/2597" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2597/hovercard">#2597</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Vaibhav <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/7ttp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/7ttp">@ 7ttp</a></li> </ul> </li> <li> <b>2.112.2-canary.0</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.2-canary.0">2026-08-06</a></br><h2>2.112.2-canary.0 (2026-08-06)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>realtime:</strong> prevent duplicate on bindings (<a href="https://redirect.github.com/supabase/supabase-js/pull/2594" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2594/hovercard">#2594</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Filipe Cabaço <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/filipecabaco/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/filipecabaco">@ filipecabaco</a></li> </ul> </li> <li> <b>2.112.1</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.1">2026-08-05</a></br><h2>2.112.1 (2026-08-05)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>auth:</strong> preserve 5xx error message (<a href="https://redirect.github.com/supabase/supabase-js/pull/2587" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2587/hovercard">#2587</a>)</li> <li><strong>realtime:</strong> ensure setAuth doesn't disable token refresh (<a href="https://redirect.github.com/supabase/supabase-js/pull/2592" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2592/hovercard">#2592</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Eduardo Gurgel</li> <li>Vaibhav <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/7ttp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/7ttp">@ 7ttp</a></li> </ul> </li> <li> <b>2.112.1-canary.1</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.1-canary.1">2026-08-05</a></br><h2>2.112.1-canary.1 (2026-08-05)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>realtime:</strong> ensure setAuth doesn't disable token refresh (<a href="https://redirect.github.com/supabase/supabase-js/pull/2592" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2592/hovercard">#2592</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Eduardo Gurgel</li> </ul> </li> <li> <b>2.112.1-canary.0</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.1-canary.0">2026-08-03</a></br><h2>2.112.1-canary.0 (2026-08-03)</h2> <h3>🩹 Fixes</h3> <ul> <li><strong>auth:</strong> preserve 5xx error message (<a href="https://redirect.github.com/supabase/supabase-js/pull/2587" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2587/hovercard">#2587</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Vaibhav <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/7ttp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/7ttp">@ 7ttp</a></li> </ul> </li> <li> <b>2.112.0</b> - <a href="https://redirect.github.com/supabase/supabase-js/releases/tag/v2.112.0">2026-08-03</a></br><h2>2.112.0 (2026-08-03)</h2> <h3>🚀 Features</h3> <ul> <li><strong>supabase:</strong> move OpenTelemetry tracing to opt-in /tracing subpath (<a href="https://redirect.github.com/supabase/supabase-js/pull/2583" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2583/hovercard">#2583</a>)</li> </ul> <h3>🩹 Fixes</h3> <ul> <li><strong>auth:</strong> accept uppercase UUIDs in validateUUID (<a href="https://redirect.github.com/supabase/supabase-js/pull/2467" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2467/hovercard">#2467</a>)</li> <li><strong>postgrest:</strong> honour throwOnError when maybeSingle finds multiple rows (<a href="https://redirect.github.com/supabase/supabase-js/pull/2580" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2580/hovercard">#2580</a>)</li> <li><strong>storage:</strong> resolve createSignedUrls return type mismatch (<a href="https://redirect.github.com/supabase/supabase-js/pull/2474" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2474/hovercard">#2474</a>)</li> <li><strong>storage:</strong> expose service error code on StorageApiError (<a href="https://redirect.github.com/supabase/supabase-js/pull/2537" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2537/hovercard">#2537</a>)</li> <li><strong>supabase:</strong> forward db retry option (<a href="https://redirect.github.com/supabase/supabase-js/pull/2571" data-hovercard-type="pull_request" data-hovercard-url="/supabase/supabase-js/pull/2571/hovercard">#2571</a>)</li> </ul> <h3>❤️ Thank You</h3> <ul> <li>Anubhav Anand <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/i-anubhav-anand/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/i-anubhav-anand">@ i-anubhav-anand</a></li> <li>Gourab Singha <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gourabsingha1/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/gourabsingha1">@ gourabsingha1</a></li> <li>Juhef @ juheff</li> <li>Katerina Skroumpelou <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mandarini/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/mandarini">@ mandarini</a></li> <li>Thribhuvan</li> <li>Vaibhav <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/7ttp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/7ttp">@ 7ttp</a></li> <li>Zuhef Ahmed <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Zuhef/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/Zuhef">@ Zuhef</a></li> </ul> </li> </ul> from <a href="https://redirect.github.com/supabase/supabase-js/releases">@supabase/supabase-js GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6ImZha2Uta2V5IiwiYW5vbnltb3VzSWQiOiI3MTA5YzliNi04YjY0LTRlOGYtYjI1My03MGY3MGJmOTZkNWQiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjcxMDljOWI2LThiNjQtNGU4Zi1iMjUzLTcwZjcwYmY5NmQ1ZCJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.eu.snyk.io/org/antigravity-awesome-skills-default/project/e1f199d3-0a16-4ac7-a9a1-528e774fc41f?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.eu.snyk.io/org/antigravity-awesome-skills-default/project/e1f199d3-0a16-4ac7-a9a1-528e774fc41f/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.eu.snyk.io/org/antigravity-awesome-skills-default/project/e1f199d3-0a16-4ac7-a9a1-528e774fc41f/settings/integration?pkg=@supabase/supabase-js&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"breakingChangeRiskLevel":"low","FF_showPullRequestBreakingChanges":true,"FF_showPullRequestBreakingChangesWebSearch":false,"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@supabase/supabase-js","from":"2.112.0","to":"2.112.2"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"7109c9b6-8b64-4e8f-b253-70f70bf96d5d","prPublicId":"7109c9b6-8b64-4e8f-b253-70f70bf96d5d","packageManager":"npm","priorityScoreList":[],"projectPublicId":"e1f199d3-0a16-4ac7-a9a1-528e774fc41f","projectUrl":"https://app.eu.snyk.io/org/antigravity-awesome-skills-default/project/e1f199d3-0a16-4ac7-a9a1-528e774fc41f?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":6,"publishedDate":"2026-08-06T13:36:57.425Z"},"vulns":[]}'
Description
Moves all OpenTelemetry-touching code out of the main
@supabase/supabase-jsbundle into a new opt-in subpath,@supabase/supabase-js/tracing. After this change,dist/index.cjs,dist/index.mjs, and the UMD build contain zero references to@opentelemetry/api, which eliminates the class of bundler-compatibility failures (Hermes, Metro with package exports, SSR/Edge bundlers) that required workarounds in #2381 and #2393.Usage becomes:
What changed?
packages/core/supabase-jssrc/tracing.tssubpath entry: imports@opentelemetry/apistatically and registers a trace context extractor as an import side effect. No exports.src/lib/tracingRegistry.ts: the registration slot lives onglobalThiskeyed bySymbol.for('@supabase/supabase-js.traceContextExtractor')rather than module scope, so it works even when an app loads mixed build formats (for exampledist/tracing.mjsvia theimportcondition anddist/index.cjsviarequireorreact-native), which are separate module instances.src/lib/fetch.ts:getTraceHeadersis now synchronous and reads the extractor from the registry on each request (supports registration after client creation). WhentracePropagationis enabled but the runtime is not loaded, it logs a one-time warning and sends the request without trace headers.tsdown.config.ts: deletes both bundler workarounds (theinject-bundler-ignore-commentsplugin and the CJS resolution alias for@supabase/tracing), adds thesrc/tracing.tsentry, and marks@opentelemetry/apias external.package.json: adds the./tracingexport (withreact-native,import, andrequireconditions, mirroring./cors), replaces"sideEffects": falsewith a whitelist of the tracing entries, and declares@opentelemetry/apias an optional peer dependency.jsr.json: adds the./tracingexport and maps@opentelemetry/apitonpm:@opentelemetry/api@^1.0.0.packages/shared/tracing(internal, stays private and bundled)extract.ts(dynamicimport()of a hidden@opentelemetry/apispecifier) is deleted, replaced by a purecreateTraceContextExtractor(otel)factory that receives the API object from the caller. The package no longer references OpenTelemetry at all.Why was this change needed?
The 2.106.0 tracing feature bundled a dynamic
import('@opentelemetry/api')into the main bundle. That physical reference is what broke React Native/Hermes (#2380) and Metro on newer Expo SDKs, and each fix (#2381, #2393) patched one bundler-resolution edge while leaving the root cause in place. Two additional problems with the previous design: rolldown preserves nativeimport()in CJS output (the reason the alias workaround existed), and the deliberately hidden import specifier meant bundlers never included@opentelemetry/api, so tracing silently did not work in Metro- or webpack-bundled apps at all. A static import in an opt-in entry is hermesc-safe (it lowers torequire()in CJS), statically analyzable, and bundleable, so tracing now actually works in bundled apps for consumers who opt in.Screenshots/Examples
New invariants enforced by
test/bundle-hermes-compat.test.cjsafter every build:import()expression in any shipped.cjs/.mjsfile@opentelemetryreferences (outside comments) indist/index.*anddist/umd/supabase.jsdist/tracing.mjsuses a static top-level import anddist/tracing.cjsusesrequire()for@opentelemetry/apireact-nativeexport condition present for.,./cors, and./tracing./dist/*path listed in"sideEffects"exists on diskA new module-resolution test (
test/module-resolution-tracing.test.mjs) covers the mixed-format case end to end: the tracing subpath loaded as ESM, the main entry loaded as CJS, and atraceparentheader attached to a client request through the shared registry.Breaking changes
No API surface is removed and
tracePropagation/TracePropagationOptionsare unchanged. One behavioral note for reviewers: consumers who already enabledtracePropagation(feature shipped in 2.106.0) must add theimport '@supabase/supabase-js/tracing'line to keep emitting trace headers. Without it they get a one-time console warning and requests are sent without trace headers; nothing else changes. The CDN/UMD build cannot load the tracing runtime, so trace propagation is not available there (documented in the README).Checklist
<type>(<scope>): <description>pnpm nx formatto ensure consistent code formattingAdditional notes
Symbol.forstring used by the registry is a de facto stable contract (module-resolution tests read the slot directly); renaming it would orphan registrations from other copies of the package in one process.^1.0.0because Deno-style npm specifiers do not accept>=ranges; the npm peer dependency range remains>=1.0.0. The subpath only usespropagationandcontext, both available since 1.0.0.client.observability.trace_propagationentry insdk-compliance.yamldocumenting the new subpath-import requirement.