Raven.async=true, sentry server can not get data

hi, when i set ‘raven.async=true’, sentry server can not get data,but when ‘raven.async=false’ the
sentry server can get data. i do not why, who can give me some proposal.
thanks :relaxed:

I’m assuming you’re using our version of raven-java here.

This can happen if the JVM exits before the thread responsible for sending the exception data to Sentry server finishes it’s work. This situation can’t occur if the asynchronous connection isn’t used and the exception occurs on the main thread. This would explain why you’re not experiencing the same behavior with raven.async=false.

There’s a “Graceful Shutdown” option, covered in the documentation, which allows you to tune this grace period to something that makes sense for your system: https://github.com/getsentry/raven-java#graceful-shutdown-advanced A “correct” value here depends on a lot of things — network latency, system load, etc. — so there’s no one-size-fits-all answer to what to put here. Conservative (larger) estimates are probably better.