class Rack::Stats
Constants
- DEFAULT_STATS
- VERSION
Public Class Methods
new(app, args = {})
click to toggle source
# File lib/rack/stats.rb, line 38 def initialize(app, args = {}) @app = app @namespace = args.fetch(:namespace, ENV['RACK_STATS_NAMESPACE']) @statsd = Statsd.new(*args.fetch(:statsd, '127.0.0.1:8125').split(':')) @stats = args.fetch(:stats, DEFAULT_STATS) end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/stats.rb, line 45 def call(env) Runtime.new(@statsd, @app, env, @stats, @namespace).execute end