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 Processor example is problematic #3241

Closed
alanwest opened this issue Apr 29, 2022 · 0 comments · Fixed by #3370
Closed

Filtering Processor example is problematic #3241

alanwest opened this issue Apr 29, 2022 · 0 comments · Fixed by #3370

Comments

@alanwest
Copy link
Member

The filtering processor example has some problems.

As noted by @hadashiA, SetParentProvider does not not get invoked on the SimpleActivityExportProcessor in the example.

Personally, I don't think a processor is a great solution for doing this. Even though the specification itself suggests that filtering is a good use case to satisfy with a span processor:

SDK MUST allow users to implement and configure custom processors and decorate built-in processors for advanced scenarios such as tagging or filtering.

I'd be more inclined to write my own exporter that does the filtering. For example, you could write an exporter that wrapped the OTLP exporter. Your exporter would do the filtering and forward to the underlying exporter.

I think replacing the example with an example of a custom exporter that does filtering may be a better solution than trying to provide a mechanism to set the provider.

Originally posted by @alanwest in #3201 (comment)

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

Successfully merging a pull request may close this issue.

1 participant