Skip to content
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

Add propagation API #797

Merged
merged 5 commits into from
Feb 26, 2020

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Feb 19, 2020

This is the first step toward #777. After this, all call-sites will still need to be updated to use the new API.

@dyladan dyladan added enhancement New feature or request API labels Feb 19, 2020
@dyladan dyladan added this to the Beta milestone Feb 19, 2020
@dyladan dyladan mentioned this pull request Feb 19, 2020
46 tasks
@codecov-io
Copy link

codecov-io commented Feb 19, 2020

Codecov Report

Merging #797 into master will decrease coverage by 0.29%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master    #797     +/-   ##
========================================
- Coverage    94.2%   93.9%   -0.3%     
========================================
  Files         245     185     -60     
  Lines       10660    6676   -3984     
  Branches     1042     630    -412     
========================================
- Hits        10042    6269   -3773     
+ Misses        618     407    -211
Impacted Files Coverage Δ
...kages/opentelemetry-metrics/test/mocks/Exporter.ts 33.33% <0%> (-16.67%) ⬇️
...opentelemetry-base/test/resources/resource.test.ts 100% <0%> (ø) ⬆️
...s/opentelemetry-metrics/test/MeterProvider.test.ts 100% <0%> (ø) ⬆️
...pe-async-hooks/test/AsyncHooksScopeManager.test.ts 100% <0%> (ø) ⬆️
...-api/src/context/propagation/NoopHttpTextFormat.ts 100% <0%> (ø) ⬆️
...-metrics/test/export/ConsoleMetricExporter.test.ts 100% <0%> (ø) ⬆️
...opagator-jaeger/test/JaegerHttpTraceFormat.test.ts 100% <0%> (ø) ⬆️
...opentelemetry-api/src/metrics/NoopMeterProvider.ts 100% <0%> (ø) ⬆️
packages/opentelemetry-plugin-mongodb/src/types.ts
packages/opentelemetry-plugin-mysql/src/utils.ts
... and 63 more

Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mayurkale22
Copy link
Member

@open-telemetry/javascript-approvers we need more reviews on this one!

/**
* Set the current propagator. Returns the initialized propagator
*/
public initGlobalPropagator(propagator: HttpTextFormat): HttpTextFormat {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consistency with using public keyword

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear, we want to always use or never use?

@Flarna
Copy link
Member

Flarna commented Feb 24, 2020

Maybe I'm not understanding this fully but I miss the Composite Propagator. Or is this added by a separate PR?

@dyladan
Copy link
Member Author

dyladan commented Feb 25, 2020

Maybe I'm not understanding this fully but I miss the Composite Propagator. Or is this added by a separate PR?

Will be a separate PR as the composite propagator is an SDK detail. From the API perspective it is the same as any other propagator.

Copy link
Member

@OlivierAlbertini OlivierAlbertini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Flarna
Copy link
Member

Flarna commented Feb 26, 2020

Will be a separate PR as the composite propagator is an SDK detail. From the API perspective it is the same as any other propagator.

Really? API exposes initGlobalPropagator so it's only possible to set the one and only propagator but nothing to add your propagator into list of the composite.

@dyladan
Copy link
Member Author

dyladan commented Feb 26, 2020

Will be a separate PR as the composite propagator is an SDK detail. From the API perspective it is the same as any other propagator.

Really? API exposes initGlobalPropagator so it's only possible to set the one and only propagator but nothing to add your propagator into list of the composite.

In your opinion is the composite propagator an API concern or a blocker for this PR? Keep in mind, with this PR we are only adding the propagation API. No code paths are actually using it yet.

@Flarna
Copy link
Member

Flarna commented Feb 26, 2020

Nope, it's not blocking.

@dyladan dyladan merged commit e2f971d into open-telemetry:master Feb 26, 2020
@dyladan dyladan deleted the propagation-api branch February 26, 2020 15:29
dyladan added a commit to dyladan/opentelemetry-js that referenced this pull request Sep 9, 2022
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants