Added B3Propagator for B3 Single Header#691
Conversation
Codecov Report
@@ Coverage Diff @@
## main #691 +/- ##
============================================
+ Coverage 80.37% 80.75% +0.38%
- Complexity 1766 1805 +39
============================================
Files 222 225 +3
Lines 4520 4615 +95
============================================
+ Hits 3633 3727 +94
- Misses 887 888 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Single and multi-header propagation should be implemented as a single propagator with two configurations. The debug flag has to be propagated (B3 Extract), the specification PR mentioned storing it in the returned context.
|
…ug flag in the returned context
|
@Nevay Added B3Propagator Class to handle two configurations and stored debug flag in the returned context. However, since we have implemented a singleton class for all the propagators, it is not possible to test the B3Propagator Class since there is no mechanism to reset the singleton static instance. |
|
We should allow users to choose between the two modes, either by having a singleton for each mode, or by exposing the constructor with an argument that allows choosing between the two modes.
|
|
@Nevay so having a third B3Propagator class is not required since we have a singleton for each B3 Single and B3 Multi propagator? |
|
No, we still need the combined |
Nevay
left a comment
There was a problem hiding this comment.
Should be moved out of the API into an extension package - see Propagators Distribution.
@Nevay do we have any extension packages in opentelemetry-php? |
discussed in SIG, please go ahead and create an extensions dir (this is what otel-java does) |
@brettmc otel-java has nested directories under extension. Do we follow the same or a simple hierarchy? Also, they have api and sdk on the root folder whereas we have it under src. Should I place extension under the src? |
|
I think |
Created the new Extension directory and moved the files under it. |
|
@kishannsangani - do we feel this is ready now? |
Yes, I just pushed the final changes for the clarification on specs. @Nevay @bobstrecansky @brettmc @tidal can you review it? |
Nevay
left a comment
There was a problem hiding this comment.
Needs a composer.json in either src/Extension/Propagator or src/Extension/Propagator/B3.
@Nevay added |
Missed out implementing B3 Single Header in #680.
Closes #500.