Closed ghost closed 11 years ago
The way I've considered doing this is actually by providing the prefix in the reporter instead of in the registry.
What reporter are you using right now?
Graphite
Eric Lindvall wrote:
The way I've considered doing this is actually by providing the prefix in the reporter instead of in the registry.
What reporter are you using right now?
— Reply to this email directly or view it on GitHub https://github.com/eric/metriks/pull/24#issuecomment-11106868.
Yeah, reporter might make more sense.
Eric Lindvall wrote:
The way I've considered doing this is actually by providing the prefix in the reporter instead of in the registry.
What reporter are you using right now?
— Reply to this email directly or view it on GitHub https://github.com/eric/metriks/pull/24#issuecomment-11106868.
You can pass :prefix => 'some_app.development'
into your graphite reporter when you initialize it:
reporter = Metriks::Reporter::Graphite.new(<options>, :prefix => 'some_app.development')
and it should give you what you need.
Ok, see the option now. Will just use that. Thanks!
Just added support for setting a prefix on metric names. Useful when you want to group metrics by application.
Example: Metriks.set_prefix('some_app.development')
Metriks.meter('requests') # => some_app.development.requests meter