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

samplingprocessor: batch all spans together for downstream processors #1834

Closed
chris-smith-zocdoc opened this issue Sep 23, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@chris-smith-zocdoc
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current implementation of samplingprocessor calls nextConsumer.ConsumeTraces once per received batch of spans. Spans arriving from different services would necessarily be in separate batches. I'd like nextConsumer.ConsumeTraces to be invoked once, with all the spans for a given trace. This would allow downstream processors to operate on the entire trace.

Describe the solution you'd like
The samplingprocessor already has all spans available, the change would be minimal, instead of invoking ConsumeTraces in a loop here https://github.com/open-telemetry/opentelemetry-collector/blob/master/processor/samplingprocessor/tailsamplingprocessor/processor.go#L183-L185 the processor would create a new pdata.Traces and add all spans to it.

Conceptually this is similar to how the groupbytrace processor works.

If this is ok, I can submit a pr for it.

@chris-smith-zocdoc
Copy link
Contributor Author

Fixed in #1864

@andrewhsu andrewhsu added the enhancement New feature or request label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants