From 43a6e70c20291c73a01e4d93d524cfa56fda15d7 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Tue, 27 Aug 2024 15:20:41 +0100 Subject: [PATCH] feat: add exception to prometheus metrics --- app/controllers/exceptions_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/exceptions_controller.rb b/app/controllers/exceptions_controller.rb index 8258309f..11c20945 100644 --- a/app/controllers/exceptions_controller.rb +++ b/app/controllers/exceptions_controller.rb @@ -10,6 +10,8 @@ def render_error status_code = ActionDispatch::ExceptionWrapper.new(env, exception).status_code sentry_code = maybe_report_to_sentry(exception, status_code) + # add the exception to the prometheus metrics + instrument_internal_error(exception) render :error_page, locals: { status: status_code, sentry_code: sentry_code },