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

Support Sampling for Long-Duration Span and Erroneous Span #12279

Open
pepeshore opened this issue Sep 18, 2024 · 1 comment
Open

Support Sampling for Long-Duration Span and Erroneous Span #12279

pepeshore opened this issue Sep 18, 2024 · 1 comment
Labels
enhancement New feature or request needs triage New issue that requires triage

Comments

@pepeshore
Copy link

pepeshore commented Sep 18, 2024

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

100% sampling rate is not suitable for production environments because of high overhead,but non-100% sampling may lead to the loss of certain important spans,such as long-Duration span and erroneous span. I try to provide a custom io.opentelemetry.sdk.trace.SpanProcessor which will hold the spans associated with the same traceId util LocalRootSpan is ended. But I found that when isRecording(samplingDecision) is false, a io.opentelemetry.api.trace.PropagatedSpan is returned instead of io.opentelemetry.sdk.trace.SdkSpan which lost a lot of important information

Describe the solution you'd like

Two solution

  1. Return a SDKSpan even if isRecording(samplingDecision) is false, by this, I can give a custom io.opentelemetry.sdk.trace.SpanProcessor to implement Sampling for Long-Duration Span and Erroneous Span
  2. if sampling for long-duration span、erroneous span or other span with specified feature is a common need,can the agent give a native support

Describe alternatives you've considered

No response

Additional context

No response

@pepeshore pepeshore added enhancement New feature or request needs triage New issue that requires triage labels Sep 18, 2024
@trask
Copy link
Member

trask commented Sep 18, 2024

hi @pepeshore! have you seen the Collector Tail-Based Sampler?

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 issue that requires triage
Projects
None yet
Development

No branches or pull requests

2 participants