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
I am using micrometer tracing for enabling tracing in my spring boot (cloud) application.
Tracing and sampling to zipkin works as expected.
However, now I need to make some custom sampling decisions based on paths, header values or jwt claims from the bearer token within the 'Authorization' header.
Something like:
never sample requests to '/actuator' endpoints
never sample requests to some specific endpoints within the application like '/anonymous'
always sample requests with header 'foo' having value 'bar'
fallback to configured percentage sampling for everything else
However, I don't seem to be able to wire it correctly within the micrometer setup.
I am aware of the possibility of using 'ObservationPredicate' e.g. for not observing specific paths, but that doesn't cover my needs.
I don'T want/need to manipulate the observation as such but only customize the sampling decisions.
The SamplingConfiguration tries to setup a HttpTracing that respects the custom rules for sampling. However, the HttpTracing bean is not used, only the Tracing bean instead.
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
Hello,
I am using micrometer tracing for enabling tracing in my spring boot (cloud) application.
Tracing and sampling to zipkin works as expected.
However, now I need to make some custom sampling decisions based on paths, header values or jwt claims from the bearer token within the 'Authorization' header.
Something like:
After some research I found that brave seems to offer possibilities to do so:
Brave: https://github.com/openzipkin/brave/blob/master/brave/README.md#custom-sampling
However, I don't seem to be able to wire it correctly within the micrometer setup.
I am aware of the possibility of using 'ObservationPredicate' e.g. for not observing specific paths, but that doesn't cover my needs.
I don'T want/need to manipulate the observation as such but only customize the sampling decisions.
My micrometer-tracing-bridge-brave example:
https://github.com/sandra-markerud/spring-demos/tree/feature/custom-sampling-brave
The SamplingConfiguration tries to setup a HttpTracing that respects the custom rules for sampling. However, the HttpTracing bean is not used, only the Tracing bean instead.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: