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

Dropping and Filtering Spans from Within a Trace #5838

Closed
mjallday opened this issue Oct 5, 2021 · 3 comments
Closed

Dropping and Filtering Spans from Within a Trace #5838

mjallday opened this issue Oct 5, 2021 · 3 comments

Comments

@mjallday
Copy link

mjallday commented Oct 5, 2021

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

We need a feature to allow for dropping/filtering spans from third party services which are out of our control.

Describe the solution you'd like

Being able to use a syntax similar to the logs and metrics filterprocessor would be useful.

processors:
  filter/remove_hello_world_spans:
    spans:
      exclude:
        match_type: strict
        attributes:
          - key: some_attribute
             values: [hello_world]

I would like to be able to use this type of filter like so that i may be able to route all spans/traces to one exporter but for another exporter only receive a subset of the spans within a trace

service:
  pipelines:
    traces/all:
      receivers: [otlp]
      processors:
        - batch
      exporters: [jaeger/all]
    traces/clean:
      receivers: [otlp]
      processors:
        - filter/remove_hello_world_spans
        - batch
      exporters: [jaeger/clean]

Describe alternatives you've considered

I've looked through the various suggestions proposed in open-telemetry/opentelemetry-collector#2310 and did not find anything relevant. Everything is related to filtering at the trace level, not at the span level.

I did read that at a SIG this was discussed and resulted in some additional work being identified.

image

I understand this may result in incomplete traces but believe that this is something we can live with initially even if we cannot cover remapping spans in a first implementation to help control scope of the change.

I see several people requesting similar functionality

@bogdandrutu bogdandrutu transferred this issue from open-telemetry/opentelemetry-collector Oct 19, 2021
@boostchicken
Copy link
Member

The PR is approved and all checks passed, this be done.

@boostchicken
Copy link
Member

This issue can now be closed @bogdandrutu

@mjallday
Copy link
Author

@boostchicken I’ve been following this pr for months. This is awesome !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants