Unable to ignore /actuator from OpenTelemetry tracing #40195
Labels
for: stackoverflow
A question that's better suited to stackoverflow.com
status: invalid
An issue that we don't feel is valid
Hi,
I'm trying to ignore calls to the
/actuator
endpoint from OpenTelemetry tracing in my project that usesspring-boot-starter-parent==3.2.4
.Looking at OpenTelemetryAutoConfiguration.java it appears that I could just define my own
Sampler
Bean, but this doesn't seem to be working.Below is the configuration class I have.
But looking at the logs, you can see my request to
/actuator/health
was still traced.I know the configuration is being picked up, as I can see the AWS X-Ray trace header being propagated when I call a downstream service, so the
SdkTracerProvider
andContextPropagators
Beans are working as expected, it's just theSampler
that isn't.Looking through the tests I can see that creating your own
Sampler
is supported, so I'm sure I'm just doing something wrong somewhere, but I'm at a bit of a loss as to where...Any help would be greatly appreciated!
Thanks in advance.
The text was updated successfully, but these errors were encountered: