Skip to content

Commit

Permalink
refactor: Updates config/initializers/prometheus.rb
Browse files Browse the repository at this point in the history
Adds `Middleware instrumentation` fix for 0 memory bug by notifying Action Dispatch subscribers on Prometheus initialise
  • Loading branch information
jonrandahl committed Sep 17, 2024
1 parent c0c49fb commit 3305c88
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/initializers/prometheus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@
docstring: 'Histogram of response times for API requests',
buckets: Prometheus::Client::Histogram.exponential_buckets(start: 0.005, count: 16)
)

# Middleware instrumentation
# This fixes the 0 memory bug by notifying Action Dispatch subscribers on Prometheus initialise
ActiveSupport::Notifications.instrument('process_middleware.action_dispatch')

0 comments on commit 3305c88

Please sign in to comment.