sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

When a breakpoint is hit `@SentrySpan` causes `Object.toString` spans

Open adinauer opened this issue 1 year ago • 0 comments

Description

While debugging our spans, we noticed that when a breakpoint is hit, e.g. in a Spring Controller which uses another @Service that is also annotated with @SentrySpan, the debugging causes our span advice to kick in and record a span with op Object.toString.

We're not sure how to fix this without removing functionality like tracking toString() invocations. Maybe it's possible to check if toString (or any other method) is actually being invoked on Object and filter it out.

adinauer avatar Jul 05 '24 12:07 adinauer