From 0f097b1410e49b0f12a348c92b2579ef4641200f Mon Sep 17 00:00:00 2001 From: Richard Towers Date: Tue, 3 Oct 2023 11:14:01 +0100 Subject: [PATCH] Fix rubocop warnings --- lib/govuk_app_config/govuk_prometheus_exporter.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/govuk_app_config/govuk_prometheus_exporter.rb b/lib/govuk_app_config/govuk_prometheus_exporter.rb index 115ecba..d5a9917 100644 --- a/lib/govuk_app_config/govuk_prometheus_exporter.rb +++ b/lib/govuk_app_config/govuk_prometheus_exporter.rb @@ -4,7 +4,6 @@ require "prometheus_exporter/middleware" module GovukPrometheusExporter - # # See https://github.com/discourse/prometheus_exporter/pull/293 # @@ -12,7 +11,7 @@ module GovukPrometheusExporter # that PR is merged / released # class RailsMiddleware < PrometheusExporter::Middleware - def default_labels(env, result) + def default_labels(env, _result) controller_instance = env["action_controller.instance"] action = controller = nil if controller_instance @@ -26,13 +25,13 @@ def default_labels(env, result) end { action: action || "other", - controller: controller || "other" + controller: controller || "other", } end end class SinatraMiddleware < PrometheusExporter::Middleware - def default_labels(env, result) + def default_labels(_env, _result) # The default prometheus exporter middleware uses the controller and # action as labels. These aren't meaningful in Sinatra applications, and # other options (such as request.path_info) have potentially very high