feat(node): Add trace context to checkin#8503
Merged
AbhiPrasad merged 1 commit intodevelopfrom Jul 12, 2023
Merged
Conversation
e8fbe48 to
5d10d1f
Compare
Lms24
approved these changes
Jul 12, 2023
Member
Lms24
left a comment
There was a problem hiding this comment.
Nice! I think the duplication is fine as long as we don't have that common package for Node and Edge.
| } | ||
|
|
||
| if (dynamicSamplingContext) { | ||
| headers.trace = dropUndefinedKeys(dynamicSamplingContext) as DynamicSamplingContext; |
Member
There was a problem hiding this comment.
l: Do we really need the typecast here?
Contributor
Author
There was a problem hiding this comment.
yup unfortunately we do because this is a Partial<DynamicSamplingContext>
I general we need stronger types, but thats a refactor for later.
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.
ref #8352
This PR adds
tracecontext to checkin bodies (see https://develop.sentry.dev/sdk/check-ins/) as well as to the checkin envelope header.There are a couple things to note here.
In general the solution here does introduce some tech debt, but I think it's worth the cost to just get this shipped. In addition, it provides additional reasons why we should refactor the client processing pipeline in a more comprehensive way for v8.