-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 exclusion of non-application URIs if custom Sampler is used #26367
Support exclusion of non-application URIs if custom Sampler is used #26367
Conversation
mun711
commented
Jun 25, 2022
•
edited by radcortez
Loading
edited by radcortez
- Fixes OpenTelemetry: Support exclusion of non-application URIs if custom Sampler is used #25525
/cc @radcortez |
b398043
to
7f5fa03
Compare
7f5fa03
to
dfcc22c
Compare
Thank you for the PR! I'm not totally sure if we want to support adding samplers as CDI Beans. I know that we already have a few other things that we configure with CDI Beans, but I believe that was a mistake. OTel now provides a well-defined configuration to set a lot of stuff, we just need to support it first. I think our goal should be to move to https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md and use |
@radcortez - Thanks for the reply If we go ahead with the autoconfigure ticket I guess this PR and the relevant issue may be closed as no longer wanted ? |
Not sure yet. I do know that we want to go with the OTel way to configure things. Since they already have a way to configure all of their APIs we should go with that instead of providing specific ways to configure stuff (CDI Beans). We don't even have support configuration as CDI Beans for everything, so we would either need to add it to make it consistent or drop it altogether. This means that we need to somehow migrate / deprecate the current CDI support. Maybe we just need to offer our custom Sampler that users can extend that excludes the non-application uris out of the box. |
The way that Quarkus configures samplers today gives the possibility of using CDI beans already, so the PR is not adding this functionality, it is just extending the exclusion of non-application URIs also if the CDI bean is used. I know that when that sampler as a bean was added, was because AWS X-Rray Sampler needed custom configuration and needed to use a custom bean as the OTEL auto configuration thing wouldn't configure it, and the auto configuration stuff was in alpha. The thing about exposing a custom Sampler, is that people will need to extend that, and also extend another Sampler or create a custom delegate on top of Quarkus custom sampler to use the desired sampler (AWS X-Ray for instance), I think that is it adds more complexity. |
dfcc22c
to
8091037
Compare
I know, but I want to avoid additional behavior relying on CDI. Ideally, we should replace the CDI Sampler with the OTel config, but I agree that it may take a while. |
...entelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/TracerUtilTest.java
Outdated
Show resolved
Hide resolved
7996a55
to
f53762e
Compare
f53762e
to
78d3067
Compare
Thanks! |