Fix jaeger RemoteControlledSampler not working in quarkus native images #2674
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jaeger tracing currently doesn't work when using quarkus-native images and a jaeger sampling configuration that uses the sampling strategies defined in the Jaeger Collector component (i.e. using the RemoteControlledSampler).
This seems caused by the reflection used in conjunction with the
io.jaegertracing.internal.samplers.HttpSamplingManager
class.There, a
SamplingStrategyResponse
object is deserialized from the JSON response using gson, which makes use of reflection to do so. That means that, at least with the currentquarkus-jaeger
code, a reflection config has to be defined in places where the JaegerTracer is used (see also quarkusio/quarkus#10402 (comment)).This PR adds that.
Hope would be that quarkusio/quarkus#10402 gets solved in a way that doesn't make such a configuration necessary, so that this reflection config can be removed again with a quarkus update.
Relates to:
eclipse/packages#245
I've triggered a test build here also without the
jaeger
maven profile. That causes some warnings (e.g.WARNING: Could not resolve io.jaegertracing.internal.samplers.http.OperationSamplingParameters for reflection configuration.
), but the build succeeds.