-
Notifications
You must be signed in to change notification settings - Fork 890
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
Clarify that Sampler can be shared among TracerProvider #1690
Comments
This also needs to be clarified for exporters and spanprocessors. |
Isn't TracerProvider meant to be a singleton? |
From the spec:
|
cc @bogdandrutu |
Discussed during the spec SIG meeting:
@bogdandrutu need your input on this. |
If we don't allow Sampler to be shared we can do improvements like pre-calculate conditions on Resource. I personally believe that every implementation of the Sampler can have its own requirement, for example a Sampler that needs access to Resource can require to not be shared. |
Right now, because the usage of Resource is an edge case, I think an implementation that needs Resource right now, can take the Resource as argument in the ctor and have a limitation that can be assign to only one TracerProvider which is fine, because right now we don't say that Sampler MUST be able to be associated with multiple TracerProviders. I think that is the case for exporter and Processor |
In #1658 it is discussed whether
Sampler
can be shared between differentTracerProvider
instances or not. In the Spec itself there's no mention of this, and we should definitely clarify this, whether this is allowed or not.The text was updated successfully, but these errors were encountered: