-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(sveltekit): Switch to Otel-based @sentry/node
package
#11075
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
Conversation
3bc9e3f
to
762c5c5
Compare
c29cb28
to
7ef5b51
Compare
@@ -229,6 +229,7 @@ describe('handleSentry', () => { | |||
expect(_span!.spanContext().traceId).toEqual('1234567890abcdef1234567890abcdef'); | |||
expect(spanToJSON(_span!).parent_span_id).toEqual('1234567890abcdef'); | |||
expect(spanIsSampled(_span!)).toEqual(true); | |||
expect(_span!.metadata!.dynamicSamplingContext).toEqual({}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this actually works? 😅 I thought this should fail as this would not be set?
Can we do instead getDynamicSamplingContextForSpan(_span)
here to test this, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was as surprised as you that it works 😅 hmm I don't wanna use getDynamicSamplingContextForSpan
here because I don't think this is necessarily all the logic that contributes to what we ultimately propagate/put into the envelope. Maybe I just refactor these tests similarly to the ones in load.test.ts
to use the beforeEnvelope
hook to check for the trace
header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
niiiiiice
e212246
to
9cd0647
Compare
size-limit report 📦
|
…ry#11075) This PR switches the underlying Node SDK from `@sentry/node-experimental` (aka the "legacy" v7 Node SDK) to the new OpenTelemetry-based `@sentry/node` package.
This PR switches the underlying Node SDK from
@sentry/node-experimental
(aka the "legacy" v7 Node SDK) to the new OpenTelemetry-based@sentry/node
package.Had to make a couple of adjustments for tests but overall, the process was rather smooth.
Known Issues
fetch
calls are no longer auto-instrumented in dev mode. They're still instrumented in prod builds. This is because the SDK/Otel seems to initialize too late in dev mode so the instrumentation of node fetch (undici) doesn't work anymore (?)