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

Support Custom Samplers #3684

Open
forestsword opened this issue Jan 31, 2025 · 2 comments
Open

Support Custom Samplers #3684

forestsword opened this issue Jan 31, 2025 · 2 comments
Labels
area:auto-instrumentation Issues for auto-instrumentation needs triage

Comments

@forestsword
Copy link

Component(s)

auto-instrumentation

Describe the issue you're reporting

Hello, I'd like to be able to use a custom sampler that I'm injecting as an extension for Java applications. However the sampler type in the instrumentation is an enumeration and I cannot configure it to use my sampler. I don't suggest to remove the type check but there should be some escape hatch to be able to do this.

Could a custom sampler type be added to the list and add a 3rd field like sampler.custom_type that takes any string but is only used in combination with the custom sampler?

I also just noticed the Java sdk is even including new samplers that are not in the type check: https://opentelemetry.io/docs/languages/java/sdk/#sampler

Thanks

@pavolloffay
Copy link
Member

Did you try defining the sampler env variable in the instrumentation CR as a workaround?

@pavolloffay
Copy link
Member

I am also not opposed for adding a custom sampler type to the instrumentation API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation needs triage
Projects
None yet
Development

No branches or pull requests

2 participants