From e74774e366f1f4ecb189ec2e235c46ea39a6d57e Mon Sep 17 00:00:00 2001
From: David Roetzel <david@roetzel.de>
Date: Mon, 17 Mar 2025 16:50:13 +0100
Subject: [PATCH] Disable installation of instrumentation hooks (#34192)

---
 config/initializers/prometheus_exporter.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/initializers/prometheus_exporter.rb b/config/initializers/prometheus_exporter.rb
index fab08ceebbb..fdfee59dc89 100644
--- a/config/initializers/prometheus_exporter.rb
+++ b/config/initializers/prometheus_exporter.rb
@@ -24,6 +24,6 @@ if ENV['MASTODON_PROMETHEUS_EXPORTER_ENABLED'] == 'true'
   else
     # Include stripped down version of PrometheusExporter::Middleware that only collects queue time
     require 'mastodon/middleware/prometheus_queue_time'
-    Rails.application.middleware.unshift Mastodon::Middleware::PrometheusQueueTime
+    Rails.application.middleware.unshift Mastodon::Middleware::PrometheusQueueTime, instrument: false
   end
 end