-
Notifications
You must be signed in to change notification settings - Fork 813
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
feat(sdk-trace-base): move Sampler declaration into sdk-trace-base #3088
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3088 +/- ##
==========================================
- Coverage 93.08% 92.11% -0.98%
==========================================
Files 189 87 -102
Lines 6293 2499 -3794
Branches 1329 548 -781
==========================================
- Hits 5858 2302 -3556
+ Misses 435 197 -238
|
413abd8
to
f391cc0
Compare
5499f4c
to
08e6c82
Compare
Should we adapt the samplers here to use the type from SDK? Or is this planned for a followup PR? |
@Flarna we cannot, or we'll get a circular dependency between @opentelemetry/core and @opentelemetry/sdk-trace-base. I believe the exported Samplers in @opentelemetry/core can not be removed until v2.0.0. Before which, we can not change that. |
there isn't much left in the core package. we could copy the samplers and deprecate the package entirely. I think all thats left is some transformation code and clock code. |
There are |
Most of the other SIGs actually put those propagators in the API, but they don't have need of a context manager so their API can be used standalone for propagation. We still at least need a context manager. We could discuss adding a default context manager to the API but then we're talking about much more substantial changes. |
I think Java has a context manager in API but that's not really comparable because we have the need of at least 3 (zone.js, AsyncLocalStorage, AsyncHooks).... |
That's what I meant. Other languages have a single obvious context implementation where we need to support many. It would be possible to move the ALS/hooks one to the API and use it when it is available, but in web we would need to fall back to either noop or stack because we can't depend on zone.js |
Might be worth |
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
Which problem is this PR solving?
Fixes #2961
Duplicated the declaration and definition of
Sampler
andIdGenerator
in@opentelemetry/sdk-trace-base
and deprecated the ones defined in@opentelemetry/core
.Type of change
This is not breaking.
How Has This Been Tested?
Sampler
s andIdGenerator
s are tested in the@opentelemetry/sdk-trace-base
package.Checklist: