Open jasonculverhouse opened 1 month ago
Hi @jasonculverhouse, Thanks for reaching out!
Unfortunately you are correct, Async servlets are currently not supported in Sentry. We will discuss internally and let you know!
In the meantime, I'm looking at a workaround to provide to you, but it needs some testing. Again, as soon as I have something, I will let you know.
Hi @jasonculverhouse, Sorry for the delay, but I haven't found a viable workaround yet. Just wanted to let you know, that we are still looking into this and haven't forgotten. We'll bump the prio on this and I'll hopefully be able to alot enough time the week after next to get this resolved.
Integration
sentry-servlet
Java Version
17
Version
7.11.0
Steps to Reproduce
When using "async" servlet requests that use the
SentryServletRequestListener
. I see the "http" bread crumbs from other requests.The same thread is not used for the push and pop events for an async request.
It would take me some time but I could Probably write an example.
Note that this pattern works fine if I don't call as everything stays in the same thread
ServletRequest.startAsync()
I don't see any example using the
javax.servlet.AsyncContext
Expected Result
Bread Crumbs don't leak and build up over time.
Actual Result
For an app that does not use async context
Sentry objects are ~ number of threads in the application.
If I use an async method Breadcrumb start to accumulate mostly with the
The http messages/bread crumbs that accumulate are always the methods that are async.