feat(otel): Add extract functionality to SentryPropagator#6115
Merged
AbhiPrasad merged 3 commits intomasterfrom Nov 3, 2022
Merged
feat(otel): Add extract functionality to SentryPropagator#6115AbhiPrasad merged 3 commits intomasterfrom
AbhiPrasad merged 3 commits intomasterfrom
Conversation
5 tasks
becc6cb to
961e016
Compare
Contributor
size-limit report 📦
|
961e016 to
e745253
Compare
e745253 to
78e6c51
Compare
mydea
reviewed
Nov 3, 2022
| public extract(context: Context, _carrier: unknown, _getter: TextMapGetter): Context { | ||
| return context; | ||
| public extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { | ||
| let newContext = context; |
Member
There was a problem hiding this comment.
l: Do we need newContext here, or can we just set directly on context?
Contributor
Author
There was a problem hiding this comment.
This was done because I didn't want to mutate the func param as per https://eslint.org/docs/latest/rules/no-param-reassign
mydea
approved these changes
Nov 3, 2022
78e6c51 to
d884c91
Compare
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 #6107
blocked by #6107
Extract
sentry-traceandbaggageheaders from incoming requests and add them to context.sentry-tracetraceparent info is added to span context, while a new context field is added for dynamic sampling context.Approach is based on https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-propagator-b3/src/B3SinglePropagator.ts