Module: UnicornMetrics::DefaultHttpMetrics
- Defined in:
- lib/unicorn_metrics/default_http_metrics.rb
Instance Method Summary collapse
Instance Method Details
#register_default_http_counters ⇒ Object
2 3 4 5 6 7 |
# File 'lib/unicorn_metrics/default_http_metrics.rb', line 2 def register_default_http_counters [ ["responses.2xx", /[2]\d{2}/], ["responses.3xx", /[3]\d{2}/], ["responses.4xx", /[4]\d{2}/], ["responses.5xx", /[5]\d{2}/] ].each { |c| register(:response_counter, *c) } end |
#register_default_http_timers ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/unicorn_metrics/default_http_metrics.rb', line 9 def register_default_http_timers [ ['requests.GET', 'GET'], ['requests.POST', 'POST'], ['requests.DELETE', 'DELETE'], ['requests.HEAD', 'HEAD'], ['requests.PUT', 'PUT'] ].each { |c| register(:request_timer, *c) } end |