-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow Sampler overriding when starting a span #401
Comments
I'd ask whether the
I'd suggest that this API, which is only good for relatively simple decision making, isn't good enough (e.g., it doesn't take the span's starting attributes, which are critical to good sampling decisions IMO). In the context of #381 which follows OTEP 66, I'd suggest that we change the signature of Then you'd be able to create a new Sampler implementation that looks for additional information in the context, such as a bit determined by a URL parameter. |
@jmacd My original thought is using different But open-telemetry/oteps#66 seems not related to Sampler API. In OTEP 0006 which defines Sampler API, it shows that initial set of |
You mean to add the starting attributes as a parameter to the sampling API? That works -- until someone points out the next thing it's missing. If you wanted to use the (distributed) correlation context for example, another signature change would be needed. The relationship with open-telemetry/oteps#66 is that everything will be accessible from the Context, possibly we should use the Context in the sampling API. That can be a future step, but we'll end up changing the API a lot if we change it for every missing parameter. |
please open a spec issue. |
Currently only
DefaultSampler
in Provider will be used when starting a new span, which is hard to customize. For some test purpose, one may start a must-sampled span(eg. via a specific query parameter in http request) without touching the default sampler. How about setting an alternative sampler as a StartOption so that it can be used during thestartSpanInternal
period?The text was updated successfully, but these errors were encountered: