You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This refers to the quarkus-opentelemetry extension.
We have opted for using a custom io.opentelemetry.sdk.trace.samplers.Sampler CDI Bean in order to extend the existing sampling logic.
As stated in the documentation, this means that the quarkus.opentelemetry.tracer.suppress-non-application-uris option has no effect, so that the logic for suppressing non-application uris has to be added manually to the custom Sampler.
For applications not using a common /q prefix for the non-application uris, assembling the URIs and applying the path resolution shows to be quite cumbersome.
information, given to the TracerRecorder.setupSampler() method is somehow made available for the creation of a custom Sampler.
Implementation ideas
Instead of checking for a Sampler bean, the TracerRecorder.setupSampler() method could check for a bean of a new SamplerFactory class, containing a factory method to which the above mentioned dropNonApplicationUris and dropStaticResources can be supplied by the TracerRecorder.setupSampler() method.
The text was updated successfully, but these errors were encountered:
I'm new to quarkus and didn't check out the code related to this issue yet, but the description seems to be quite detailed. @calohmn@radcortez
Could I take this issue to investigate?
@radcortez
added the changes in #26367
Updated the TracerUtil:mapSampler method to search for a sampler bean and use it instead of a baseSampler if found.
Please let me know if that looks good to you or we still want to move this logic to a SamplerFactory.
FMPOV, this kind of approach of applying the DropNamesSampler and parentBased Sampler on top of the custom sampler also looks ok. The configuration properties documentation would then have to be adapted, dropping the "Providing a custom [...]" part for the quarkus.opentelemetry.tracer.suppress-non-application-uris and quarkus.opentelemetry.tracer.include-static-resources descriptions.
Description
This refers to the
quarkus-opentelemetry
extension.We have opted for using a custom
io.opentelemetry.sdk.trace.samplers.Sampler
CDI Bean in order to extend the existing sampling logic.As stated in the documentation, this means that the
quarkus.opentelemetry.tracer.suppress-non-application-uris
option has no effect, so that the logic for suppressing non-application uris has to be added manually to the custom Sampler.For applications not using a common
/q
prefix for the non-application uris, assembling the URIs and applying the path resolution shows to be quite cumbersome.It would be helpful, if the
information, given to the TracerRecorder.setupSampler() method is somehow made available for the creation of a custom Sampler.
Implementation ideas
Instead of checking for a Sampler bean, the
TracerRecorder.setupSampler()
method could check for a bean of a newSamplerFactory
class, containing a factory method to which the above mentioneddropNonApplicationUris
anddropStaticResources
can be supplied by theTracerRecorder.setupSampler()
method.The text was updated successfully, but these errors were encountered: