Repository navigation
docs: update client-side tracing and Edge Function CORS guides - #48924
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe changes expand Edge Function CORS allow-lists for retry and trace context headers. Documentation now covers SDK synchronization, browser trace propagation, sampling behavior, vendor setup, warnings, and troubleshooting. ChangesCORS and client tracing
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@apps/docs/content/guides/functions/cors.mdx`:
- Around line 58-59: The CORS guidance in the SDK import paragraph cites an
unpublished version and incorrectly attributes trace headers to v2.112.2.
Replace it with the published SDK version whose cors export includes
traceparent, tracestate, and baggage, and add instructions for refreshing the
lock-file resolution when upgrading before redeploying.
In `@apps/docs/content/guides/monitoring-and-debugging/client-side-tracing.mdx`:
- Around line 111-112: Update the Sentry browser row’s CORS guidance to require
allowing sentry-trace, baggage, and traceparent in Access-Control-Allow-Headers
when targeting an Edge Function, while preserving the existing
tracePropagationTargets and propagateTraceparent guidance.
- Around line 74-79: Update the CORS guidance in the note to use the Deno Edge
Function import specifier `npm:`@supabase/supabase-js`@^2.112.3/cors` when
importing `corsHeaders`; retain the alternative of adding `traceparent`,
`tracestate`, and `baggage` to a custom allow-list.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 34bbc90c-c441-470f-9e15-6eef9183e44b
📒 Files selected for processing (4)
apps/docs/content/guides/functions/cors.mdxapps/docs/content/guides/monitoring-and-debugging/client-side-tracing.mdxapps/www/supabase/functions/_shared/cors.tsexamples/edge-functions/supabase/functions/_shared/cors.ts
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
a2a8a91 to
fb2f90f
Compare
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 `@apps/docs/content/guides/functions/cors.mdx`:
- Line 62: Update the trace-header table in the CORS guide to document the
sampling condition: state that tracestate and baggage are sent for sampled
traces or whenever respectSamplingDecision is false, while an active non-sampled
trace with respectSamplingDecision true sends only traceparent.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 4a388009-c556-41bc-9c45-bb28f4c1e0fd
📒 Files selected for processing (2)
apps/docs/content/guides/functions/cors.mdxapps/docs/content/guides/monitoring-and-debugging/client-side-tracing.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/docs/content/guides/monitoring-and-debugging/client-side-tracing.mdx
Braintrust eval report
|
Updates the client-side tracing and Edge Function CORS docs for changes shipping in
@supabase/supabase-jsv2.112.3 (supabase/supabase-js#2603, supabase/supabase-js#2604). The tracing guide gains a vendor compatibility table (plain OpenTelemetry works as is, Sentry needspropagateTraceparent: true, Datadog RUM needsallowedTracingUrls), the newrespectSamplingDecisionsemantics (non-sampled requests now carrytraceparentonly, so logs stay correlatable), a troubleshooting entry for the SDK's new propagator warning, and a note that browser calls to Edge Functions need the trace headers in the function's CORS allow-list. The CORS guide now states explicitly that trace headers are sent only when trace propagation is opted in (never by default), adds a table of when each SDK header is actually sent, and the hardcodedcorsHeadersexamples are updated to the full header list. Should merge after the v2.112.3 release is published, since it documents that version's behavior.Summary by CodeRabbit
Documentation
Bug Fixes