-
Notifications
You must be signed in to change notification settings - Fork 565
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
Request more fine-grained control for remote sampling #6127
Comments
cc @yurishkuro as codeowner of the jaegerremote sampler. |
Thanks @dmathieu! @yurishkuro The proposed schema change is as follows: while you're right that a schema change alone is insufficient, we can also make corresponding adjustments to the OTEL SDKs to enable fine-grained control for remote sampling. What are your thoughts on this?
|
The current implementation performs stratified sampling by dividing all requests into strata where each stratum corresponds to one of the endpoints of the service. In order to make sampling sensitive to tags the strata need to be redefined carefully, such that the overall space remains deterministically partitioned. I don't agree that the proposed schema change is the best partitioning, because it only does sub-partitioning within existing strata by the endpoint. But I can easily imaging someone wanting to say "sample all errors 100%" regardless of the endpoint, which is not really possible via this schema. Fundamentally, I think this requires a large re-design where we treat all dimensions of a span equally. There is technically nothing special about the There are a couple of proposals in the OTEL spec (I don't have time to look for them) that propose more generic configuration for samplers. We need to align with those proposals, not build something bespoke. Especially because changing the sampling definition schema means that Jaeger's adaptive sampling would also need to be changed accordingly (keeping track of the same strata as the SDK), and right now it's pretty much hard-coded with service/operation partitioning. |
Thanks @yurishkuro for your rely. Your concerns are well-founded. Relying solely on endpoint-based partitioning does limit the flexibility needed for more advanced use cases. As you pointed out, redesigning the sampling approach to treat all dimensions of a span equally could enable fine-grained control in remote sampling. While there are several proposals in the OTEL spec, most don’t directly address remote sampling strategies. Do you think it's worth iterating on our current approach to introduce a v3 version that supports fine-grained control in remote sampling? |
Yes, I would be supportive of designing a more flexible sampling strategy data model and gradually implementing it. |
Problem Statement
The
PerOperationSampler
provides operation-level customized sampling probabilities but lacks support for more fine-grained control, such as adjusting sampling probabilities based on specific tag key-value pairs (see sampling.proto).For instance, in a real-world scenario, we might want to enforce sampling for a particular user session by customizing sampling probabilities based on specific tag key-value pairs.
Proposed Solution
Introduce a tag key-value pair in
OperationSamplingStrategy
to enable fine-grained control for remote sampling.The text was updated successfully, but these errors were encountered: