I have a complex legacy web application and I am adding Sentry integration to it. Each component (REST API call) of this web application's backend is a perl script that runs under mod_perl under Apache. It works well and is very performant. Each script uses Try::Tiny and has a structure like this:
# some setup, including Sentry with default_integrations => 0
try {
# operations
}
catch {
# deal with any croak calls that might have arisen during the operation
}
finally {
# emit the resulting JSON
}
Unfortunately the default Sentry::SDK croak integration causes this model to fail - I assume because of some weird interaction between Mojo and Try::Tiny. Regardless, what I had planned to do was disable the default integrations and just handle any Sentry output in the catch block.
I have forked the repo and will try to implement this, but if someone else has already solved it that would be great!