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

[Feature]: Filter spans before exporting (Datadog) #121

Open
fw42 opened this issue Oct 22, 2024 · 0 comments
Open

[Feature]: Filter spans before exporting (Datadog) #121

fw42 opened this issue Oct 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@fw42
Copy link

fw42 commented Oct 22, 2024

Hello,

I'm using opentelemetry-datadog and I'm missing a feature that I think might be useful to add.

I've tried implementing my own sampling algorithm but been running into limitations with with_sampler. For example, I'd like to access attributes of the root span when making a sampling decision in a non-root span (for example, root span contains a "user_id", and I want to sample following spans only for specific users). Another example is using random sampling, but if the request turned out to be an error (which might only be known a couple of spans later), then I want to overwrite those sampling decisions (i.e., if the request is an error, then always include all spans).

What component are you working with?

opentelemetry-datadog

Describe the solution you'd like:

It looks like other Datadog tracing libraries do have this feature.

Something that would help me implement this is the ability to define a custom "filter function" that runs after all spans have been collected but before they are being exported to Datadog.

Any thoughts on this?

Thanks!

@fw42 fw42 added the enhancement New feature or request label Oct 22, 2024
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

1 participant