Skip to content

Commit

Permalink
Add metrics endpoint compression with Rack Deflater (#23)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Etsenake <josh.etsenake@fullscript.com>
  • Loading branch information
etsenake and Josh Etsenake authored Nov 8, 2022
1 parent a05c4ac commit 91e006b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/yabeda/prometheus/exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def start_metrics_server!(**rack_app_options)
end
end

def rack_app(exporter = self, path: "/metrics", logger: Logger.new(IO::NULL))
def rack_app(exporter = self, path: "/metrics", logger: Logger.new(IO::NULL), use_deflater: true)
::Rack::Builder.new do
use ::Rack::Deflater if use_deflater
use ::Rack::CommonLogger, logger
use ::Rack::ShowExceptions
use exporter, path: path
Expand Down

0 comments on commit 91e006b

Please sign in to comment.