Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

only include rack.processes if rack suite enabled #75

Merged
merged 1 commit into from
Jun 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ use Librato::Rack, :config => config

The metrics recorded by `librato-rack` are organized into named metric suites that can be selectively enabled/disabled:

* `rack`: The `rack.request.total`, `rack.request.time`, `rack.request.slow`, and `rack.request.queue.time` metrics
* `rack`: The `rack.request.total`, `rack.request.time`, `rack.request.slow`, `rack.request.queue.time`, and `rack.processes` metrics
* `rack_status`: `rack.request.status` metric with `status` tag name and HTTP status code tag value, e.g. `status=200`
* `rack_method`: `rack.request.method` metric with `method` tag name and HTTP method tag value, e.g. `method=POST`

Expand Down
4 changes: 3 additions & 1 deletion lib/librato/rack/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def build_flush_queue(collector, preserve=false)
[collector.counters, collector.aggregate].each do |cache|
cache.flush_to(queue, preserve: preserve)
end
queue.add 'rack.processes' => { value: 1, tags: tags }
if suite_enabled?(:rack)
queue.add 'rack.processes' => { value: 1, tags: tags }
end
trace_queued(queue.queued) #if should_log?(:trace)
queue
end
Expand Down