-
Notifications
You must be signed in to change notification settings - Fork 27
/
metrics.clj
23 lines (20 loc) · 913 Bytes
/
metrics.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(ns puppetlabs.trapperkeeper.services.protocols.metrics)
(defprotocol MetricsService
"A service that tracks runtime metrics for the process."
(get-metrics-registry
[this]
[this domain]
"Provides access to a MetricsRegistry where `domain` is the string used to
look up the registry. Specifing no `domain` will return the default
MetricsRegistry. The `domain` is the name that will appear at the front of
the JMX metric. For example in `foo:name=my-metric`, `foo` is the
`domain`.")
(get-server-id
[this]
"Get the server-id from the `metrics` -> `server-id` part of the config.")
(update-registry-settings
[this domain settings]
"Allows for specifying settings for a metric registry reporter that don't
go into a config file. Must be called during the 'init' phase of a
service's lifecycle. Will error if called more than once per metric
registry."))