feat(sveltekit): Switch to Otel-based @sentry/node package#11075
Merged
feat(sveltekit): Switch to Otel-based @sentry/node package#11075
@sentry/node package#11075Conversation
3bc9e3f to
762c5c5
Compare
c29cb28 to
7ef5b51
Compare
mydea
reviewed
Mar 14, 2024
| expect(_span!.spanContext().traceId).toEqual('1234567890abcdef1234567890abcdef'); | ||
| expect(spanToJSON(_span!).parent_span_id).toEqual('1234567890abcdef'); | ||
| expect(spanIsSampled(_span!)).toEqual(true); | ||
| expect(_span!.metadata!.dynamicSamplingContext).toEqual({}); |
Member
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
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.
e212246 to
9cd0647
Compare
Contributor
size-limit report 📦
|
cadesalaberry
pushed a commit
to cadesalaberry/sentry-javascript
that referenced
this pull request
Apr 19, 2024
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR switches the underlying Node SDK from
@sentry/node-experimental(aka the "legacy" v7 Node SDK) to the new OpenTelemetry-based@sentry/nodepackage.Had to make a couple of adjustments for tests but overall, the process was rather smooth.
Known Issues
fetchcalls 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 (?)