Skip to content

Connect Puma low-level error handler to Sentry

Stan Hu requested to merge sh-puma-sentry into master

What does this MR do?

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.

Related issues

  1. gitlab-org/charts/gitlab#2818 (closed)
  2. gitlab-com/gl-infra/production#5194 (closed)
  3. gitlab-org/omnibus-gitlab#6284 (closed)

gitlab-org/omnibus-gitlab!5490 (merged) has some notes on how this was tested in the GDK and Omnibus.

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Integration tests added to GitLab QA
  • The impact any change in container size has should be evaluated
Edited by Stan Hu

Merge request reports