-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(otel): Add extract functionality to SentryPropagator #6115
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
becc6cb
to
961e016
Compare
size-limit report 📦
|
961e016
to
e745253
Compare
e745253
to
78e6c51
Compare
public extract(context: Context, _carrier: unknown, _getter: TextMapGetter): Context { | ||
return context; | ||
public extract(context: Context, carrier: unknown, getter: TextMapGetter): Context { | ||
let newContext = context; |
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.
l: Do we need newContext
here, or can we just set directly on context
?
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.
This was done because I didn't want to mutate the func param as per https://eslint.org/docs/latest/rules/no-param-reassign
78e6c51
to
d884c91
Compare
ref #6107
blocked by #6107
Extract
sentry-trace
andbaggage
headers from incoming requests and add them to context.sentry-trace
traceparent 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