-
Notifications
You must be signed in to change notification settings - Fork 898
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
Remove hasRemoteParent from Sampler.shouldSample method #164
Comments
To clarify a bit the comment: I am proposing to remove the hasRemoteParent from the Sampler interface because with the latest changes in the SpanBuilder, a child Span can be started with a SpanContext as parent even if the parent is not remote, so we cannot determine correctly if the parent is remote or not. |
I admit lacking some of the details that went into the current Java prototype, but on the topic of Sampler API, I have questions. Why is this considered Rationale: a user never interacts directly with the Sampler. Should this be classified |
@jmacd it cannot be in the SDK because users need this when instrumenting their applications. Imagine using the OpenTelemetry with an implementation that does upfront sampling and for some specific requests users always want to be sampled. If the Sampler is in the SDK they need to depend on the SDK to be able to specify that for this particular request/Span I always/never want sampling. I think this behavior should be supported in the API to avoid users start depending on a specific implementation. |
For our sampling implementation, a fine-grained sampling API would not be a good fit. |
@bogdandrutu assigning to you as you are working on moving sampling to SDK and related changes |
Closing this for now as there are a number of in-flight and unaccepted issues/PRs about sampling. This is stale. |
Created from open-telemetry/opentelemetry-java#430 (comment)
https://github.com/open-telemetry/opentelemetry-java/blob/ed42237b6c71052bbffe4d849647c53fae81b246/api/src/main/java/io/opentelemetry/trace/Sampler.java#L44-L50
cc @bogdandrutu
The text was updated successfully, but these errors were encountered: