Running an agent, how do I filter out some of the events #5680
-
We are running the service with agent via
We did not exclude any instrumentations from the list (https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/suppressing-instrumentation.md) We would like to exclude reporting certain http calls made to the service, eg. we have a health I could not find any configuration for the Tomcat instrumentation (I believe that's the one that reports the events) in https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/tomcat How can I drop the unnecessary reporting? I'm looking for sth similar to what JS HTTP instrumentation offers:
How can I achieve that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @gustaff-weldon, RuleBasedRoutingSampler.builder(SERVER, Sampler.parentBased(Sampler.alwaysOff))
.drop(SemanticAttributes.HTTP_TARGET, "/actuator")
.build() |
Beta Was this translation helpful? Give feedback.
Hey @gustaff-weldon,
You could try configuring a custom sampler using a javaagent extension, e.g. a
RuleBasedRoutingSampler
from the contrib repo.Unfortunately the samplers project doesn't have documentation other than Javadocs, but perhaps something like this would suffice: