getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.11k stars 427 forks source link

Option / documentation to filter out sentry internal transactions from default Opentelemetry export #3499

Open ivan-klass opened 1 week ago

ivan-klass commented 1 week ago

Problem Statement

When using sentry-opentelemetry-agent while intentionaly keeping the main (otlp) exporter, in my traces panel I see a lot of internal sentry requests performed multiple times per second. I would prefer a simple way to disable it, especially when it's not SENTRY_DEBUG.

Screenshot 2024-06-20 at 11 08 07

I've tried sentry-opentelemetry-agentcustomization but it kind of lacks documentation:

Solution Brainstorm

Add a boolean property and env var like sentry.internal.otel-export andSENTRY_INTERNAL_OTEL_EXPORT

adinauer commented 1 week ago

Thanks for opening this issue @ivan-klass, we're currently in the process of reworking our OpenTelemetry Agent. I think it should be enough to simply use SamplingDecision.DROP in OpenTelemetry Sampler when we detect an internal Sentry span. Would you agree?

ivan-klass commented 1 week ago

@adinauer thanks! Sounds good. Waiting for the next 8.x.x jar (8.0.0-alpha.2 ?) so I can verify

adinauer commented 6 days ago

Hey @ivan-klass, we've just released 8.0.0-alpha.2 of the Java SDK, there's instructions how to upgrade in the changelog. If you decide to give it a try, any feedback is welcome 🙏 .