Skip to content
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

Probabilistic sampling based on a specific attribute #33449

Open
fenos opened this issue Jun 10, 2024 · 4 comments
Open

Probabilistic sampling based on a specific attribute #33449

fenos opened this issue Jun 10, 2024 · 4 comments
Labels
enhancement New feature or request needs triage New item requiring triage processor/probabilisticsampler Probabilistic Sampler processor

Comments

@fenos
Copy link

fenos commented Jun 10, 2024

Component(s)

processor/tailsampling

Is your feature request related to a problem? Please describe.

My server runs in a multi-tenant fashion, I have a specific attribute on my trace spans called tenant.id I'd like to sample traces on a fixed ratio per tenant.id instead of sampling based on the traceId.

This will allow me to sample only x% of traces for specific tenant requests

Describe the solution you'd like

One way to achieve this is improve the probabilistic sampler and allow to pass an attributes key which the values will then be used to compute the hash as opposed to the traceId to

Describe alternatives you've considered

No response

Additional context

No response

@fenos fenos added enhancement New feature or request needs triage New item requiring triage labels Jun 10, 2024
@github-actions github-actions bot added the processor/tailsampling Tail sampling processor label Jun 10, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

Pinging code owners for processor/probabilisticsampler: @jpkrohling @jmacd. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@frzifus
Copy link
Member

frzifus commented Jun 12, 2024

Just to clarify you propose to concatenate attributes to a traceID before making a decision in the probabilistic sampler?

I assume there are no objections, wdyt @jpkrohling?

In that case do you want to work on some draft @fenos?

@frzifus frzifus removed the processor/tailsampling Tail sampling processor label Jun 12, 2024
@jpkrohling
Copy link
Member

Does all of your spans have a tenant.id attribute, or only one (or a few) spans from the whole trace? This works already with the tail-sampling processor, which has to be used anyway if you have the tenant attribute only on a few spans instead of all spans for the trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage processor/probabilisticsampler Probabilistic Sampler processor
Projects
None yet
Development

No branches or pull requests

3 participants