getsentry / sentry-java

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

Sentry can't read stacktraces generated by Project Reactor with operatorStacktrace feature #3602

Closed IcyEagle closed 4 days ago

IcyEagle commented 1 month ago

Integration

sentry

Java Version

21

Version

7.9.0

Sentry instance

24.3.0 self-hosted

Steps to Reproduce

  1. Create a project with WebFlux/Project Reactor support.
  2. Make sure that operatorStacktrace feature is on
  3. Throw an error

Your stacktrace may look like this:

retrofit2.HttpException: HTTP 400 Bad Request
    at com.home.util.RetrofitExtKt.bodyOrThrow(RetrofitExt.kt:21)
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    *__checkpoint ⇢ io.sentry.spring.jakarta.webflux.SentryWebFilter [DefaultWebFilterChain]
    *__checkpoint ⇢ HTTP POST "/admin/call" [ExceptionHandlingWebHandler]
Original Stack Trace:
        at com.home.util.RetrofitExtKt.bodyOrThrow(RetrofitExt.kt:21)
                at.foo.bar(Bazz:42)
                ...

Expected Result

Stacktrace is properly parsed and sent to the Sentry server. Then it could be read and linked with Source Maps.

Actual Result

Sentry only reads the first 2 lines, the error message and 1 stacktrace line. It probably stops at Suppressed and ignores what comes after that.

lbloder commented 1 month ago

Hi @IcyEagle, Thanks for reaching out.

Could you verify, maybe through debugging, that this is in fact a supressed exception? If so, supressed exception are currently not supported/reported on/to sentry in our stable versions. We have, however, implemented support for them already in our branch for the upcoming 8.0 release in #3396 . There's currently 8.0.0-alpha.4 out for it. You could give that a try if you'd like, you can find it here.

Hope this helps. If you have any more questions/issues, don't hesitate to let us know.

getsantry[bot] commented 1 week ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀