-
Notifications
You must be signed in to change notification settings - Fork 804
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
fix: change default propagator to match spec #1218
fix: change default propagator to match spec #1218
Conversation
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.
LGTM I actually thought it was already like this
Codecov Report
@@ Coverage Diff @@
## master #1218 +/- ##
=======================================
Coverage 92.32% 92.32%
=======================================
Files 122 122
Lines 3533 3533
Branches 714 714
=======================================
Hits 3262 3262
Misses 271 271
|
The lint will be fixed by #1217 |
@@ -78,7 +83,9 @@ export class BasicTracerProvider implements api.TracerProvider { | |||
register(config: SDKRegistrationConfig = {}) { | |||
api.trace.setGlobalTracerProvider(this); | |||
if (config.propagator === undefined) { | |||
config.propagator = new HttpTraceContext(); | |||
config.propagator = new CompositePropagator({ |
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.
Currently, HttpTraceContext
is highlighted as a default propagator in the documentation (https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-core#built-in-propagators). Could you please update the same?
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.
Hi, I added a new commit to change the documentation. Thanks for pointing this out.
Which problem is this PR solving?
Short description of the changes
Change the default propagator in the SDK to match what the spec requires.
Modify unit tests to reflect this change of default propagator.