From d901065118e19e9a099166549b76beca9f82dfbc Mon Sep 17 00:00:00 2001 From: Alex Platteeuw Date: Tue, 26 Aug 2025 10:26:59 +0200 Subject: [PATCH] fix: get controller full path instead of controller name --- lib/prometheus_exporter/middleware.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prometheus_exporter/middleware.rb b/lib/prometheus_exporter/middleware.rb index 8995acb1..bfd290d3 100644 --- a/lib/prometheus_exporter/middleware.rb +++ b/lib/prometheus_exporter/middleware.rb @@ -78,7 +78,7 @@ def default_labels(env, result) action = controller = nil if controller_instance action = controller_instance.action_name - controller = controller_instance.controller_name + controller = controller_instance.controller_path elsif (cors = env["rack.cors"]) && cors.respond_to?(:preflight?) && cors.preflight? # if the Rack CORS Middleware identifies the request as a preflight request, # the stack doesn't get to the point where controllers/actions are defined