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

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

Open IcyEagle opened this issue 1 year ago • 1 comments

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.

IcyEagle avatar Jul 24 '24 06:07 IcyEagle

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.

lbloder avatar Jul 26 '24 09:07 lbloder

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 🥀

getsantry[bot] avatar Sep 03 '24 07:09 getsantry[bot]