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

Filtering span attributes #2077

Open
pavolloffay opened this issue Nov 13, 2020 · 4 comments
Open

Filtering span attributes #2077

pavolloffay opened this issue Nov 13, 2020 · 4 comments
Labels
blocked:spec blocked on open or unresolved spec Feature Request Suggest an idea for this project

Comments

@pavolloffay
Copy link
Member

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

Our custom build of OTEL Java agent captures more data, to be specific we capture all request and response headers. This ultimately results in data duplication as the OTEL core instrumentation already collects some of that data. We want to use the core instrumentation, but somehow filter duplicated data. The data could be filtered in the collector, however we would like to save network bandwith from the user process to the collector.

Describe the solution you'd like

A pluggable API in the SDK where we could modify span before passing it to the exporter.

Describe alternatives you've considered

Remove duplicated data in the collector, however, if we could remove it directly in the user process it would be better from the network bandwidth perspective.

Additional context
None.

@pavolloffay pavolloffay added the Feature Request Suggest an idea for this project label Nov 13, 2020
@jkwatson
Copy link
Contributor

Hi @pavolloffay . Can you have an exporter wrapper that updates the SpanData to filter out what you don't want? Or, alternatively, have a SpanProcessor wrapper that does the same thing?

We have some SpanData wrapping options in the opentelemetry-sdk-extension-tracing-incubator module to help with this, as well.

@jkwatson jkwatson added the blocked:spec blocked on open or unresolved spec label Mar 5, 2021
@jkwatson
Copy link
Contributor

@pavolloffay last chance to respond or I will close this as not needed at this time.

@FrankSpitulski
Copy link
Contributor

I'm having this same issue. The SpanProcessor extension is not sufficient since I need to remove or add attributes and events onEnd, but the onEnd method only exposes a ReadableSpan interface.

@jkwatson
Copy link
Contributor

jkwatson commented Oct 8, 2021

@FrankSpitulski I recommend doing this in an exporter, rather than trying to do it in a SpanProcessor. That interface was not designed for mutating spans when they end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:spec blocked on open or unresolved spec Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

3 participants