Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vercel-edge): Use opentelemetry for @sentry/vercel-edge #13742

Merged
merged 16 commits into from
Oct 7, 2024

Conversation

lforst
Copy link
Member

@lforst lforst commented Sep 20, 2024

This PR is part of a stacked PR sequence as we need to do many changes at once for #8105. Merging this PR as is will create inconsistent data.


This PR will make the @sentry/vercel-edge SDK use OpenTelemetry performance under the hood.

We need to employ a few hacks so that OpenTelemetry works on a worker runtime:

  • We are vendoring the OTEL AsyncLocalStorageContextManage because the original implementation depends on AsyncLocalStorage as exported from async_hooks which is not available in workers. In our vendored version we are taking it from globalThis.AsyncLocalStorage.
  • We are polyfilling performance with Date.now() as that API is not available in worker runtimes.

Resolves #13740

Copy link
Contributor

github-actions bot commented Sep 20, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.73 KB added added
@sentry/browser - with treeshaking flags 21.53 KB added added
@sentry/browser (incl. Tracing) 34.97 KB added added
@sentry/browser (incl. Tracing, Replay) 71.5 KB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.91 KB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 75.82 KB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 88.59 KB added added
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.46 KB added added
@sentry/browser (incl. metrics) 27 KB added added
@sentry/browser (incl. Feedback) 39.87 KB added added
@sentry/browser (incl. sendFeedback) 27.38 KB added added
@sentry/browser (incl. FeedbackAsync) 32.17 KB added added
@sentry/react 25.49 KB added added
@sentry/react (incl. Tracing) 37.94 KB added added
@sentry/vue 26.9 KB added added
@sentry/vue (incl. Tracing) 36.86 KB added added
@sentry/svelte 22.87 KB added added
CDN Bundle 24.05 KB added added
CDN Bundle (incl. Tracing) 36.76 KB added added
CDN Bundle (incl. Tracing, Replay) 71.24 KB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 76.55 KB added added
CDN Bundle - uncompressed 70.53 KB added added
CDN Bundle (incl. Tracing) - uncompressed 109.04 KB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.93 KB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 234.15 KB added added
@sentry/nextjs (client) 37.91 KB added added
@sentry/sveltekit (client) 35.56 KB added added
@sentry/node 125.03 KB added added
@sentry/node - without tracing 93.48 KB added added
@sentry/aws-serverless 103.18 KB added added

@lforst lforst changed the base branch from develop to lforst-nextjs-otel October 1, 2024 12:58
Copy link

codecov bot commented Oct 1, 2024

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
623 2 621 33
View the top 2 failed tests by shortest run time
middleware.test.ts Records exceptions happening in middleware
Stack Traces | 120s run time
middleware.test.ts:41:5 Records exceptions happening in middleware
edge-route.test.ts Should record exceptions for faulty edge routes
Stack Traces | 120s run time
edge-route.test.ts:49:5 Should record exceptions for faulty edge routes

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@lforst lforst changed the title feat(nextjs): Use opentelemetry for @sentry/vercel-edge feat(vercel-edge): Use opentelemetry for @sentry/vercel-edge Oct 4, 2024
@lforst
Copy link
Member Author

lforst commented Oct 4, 2024

sorry for the pings - managed to screw up a merge

@lforst lforst requested a review from chargome October 7, 2024 09:18
@lforst lforst marked this pull request as ready for review October 7, 2024 09:18
@lforst lforst merged commit a9a22e8 into lforst-nextjs-otel Oct 7, 2024
138 of 142 checks passed
@lforst lforst deleted the lforst-edge-otel branch October 7, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants