Connect Puma low-level error handler to Sentry in puma.rb example
We saw in gitlab-com/gl-infra/production#5194 (closed) that errors in a middleware would only be caught by Puma's low-level handler. This error only showed up in the Puma stderr log, which made it difficult to diagnose.
If Sentry is configured, we send the exception to Sentry via Puma's low-level error handler (https://github.com/puma/puma#error-handling). The error still will get logged on stderr by Puma.
This mirrors the change we're making in CNG and Omnibus:
Testing notes are in omnibus-gitlab!5490 (merged).
Edited by Stan Hu