Ignore tracing health checks
I'd like to ignore sending traces for health check paths or even all actuator paths. My spring boot app with java instrumentation and deployed as ECS service generates many X-Ray traces unnecessary (at least for me). We are using aws-observability/aws-otel-collector deployed as a central gateway as a ECS service.
Provide config option for the agent to ignore some of the paths or other solution to the issue:
- ignore health paths in aws-otel-collector (?)
- ignore health paths on the X-Ray side (?)
I've found https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1060 and probably it can be the solution but it is fixed/implemented in the latest opentelemetry java agent but not in aws-otel-java-instrumentation
You can setup X-Ray remote sampling by following the instruction below, and then create a rule to filter out the traces you don't want to send to X-Ray
- Steps to setup remote sampling
- https://aws-otel.github.io/docs/getting-started/remote-sampling
- Steps to setup X-Ray sampling rules to filter traces. In general, create a rule with
URL path: <health_check_path>and set bothReservoirandRateto 0- https://docs.aws.amazon.com/xray/latest/devguide/xray-console-sampling.html#xray-console-sampling-examples
Thanks, yes, I was considering this but as a last resort as this won't stop sending unnecessary traces from the instrumented service.
Thanks, yes, I was considering this but as a last resort as this won't stop sending unnecessary traces from the instrumented service.
Since you have aws-otel-collector, you can configure ADOT SDK with OTEL_TRACES_SAMPLER_ARG and OTEL_TRACES_SAMPLER to read from X-Ray remote sampling. The rules are applied to the client side, so it will help in your case I think?
This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled
This issue was closed because it has been marked as stale for 30 days with no activity.