1 | # Metric namespacing
|
2 |
|
3 | The metric namespacing in the Graphite backend is configurable with regard to
|
4 | the prefixes. Per default all stats are put under `stats` in Graphite, which
|
5 | makes it easier to consolidate them all under one schema. However it is
|
6 | possible to change these namespaces in the backend configuration options.
|
7 | The available configuration options (living under the `graphite` key) are:
|
8 |
|
9 | ```
|
10 | legacyNamespace: use the legacy namespace [default: true]
|
11 | globalPrefix: global prefix to use for sending stats to graphite [default: "stats"]
|
12 | prefixCounter: graphite prefix for counter metrics [default: "counters"]
|
13 | prefixTimer: graphite prefix for timer metrics [default: "timers"]
|
14 | prefixGauge: graphite prefix for gauge metrics [default: "gauges"]
|
15 | prefixSet: graphite prefix for set metrics [default: "sets"]
|
16 | ```
|
17 |
|
18 | If you decide not to use the legacy namespacing, besides the obvious changes
|
19 | in the prefixing, there will also be a breaking change in the way counters are
|
20 | submitted. So far counters didn't live under any namespace and were also a bit
|
21 | confusing due to the way they record rate and absolute counts. In the legacy
|
22 | setting rates were recorded under `stats.counter_name` directly, whereas the
|
23 | absolute count could be found under `stats_counts.counter_name`. When legacy namespacing
|
24 | is disabled those values can be found (with default prefixing)
|
25 | under `stats.counters.counter_name.rate` and
|
26 | `stats.counters.counter_name.count` now.
|
27 |
|
28 | The number of elements in sets will be recorded under the metric
|
29 | `stats.sets.set_name.count` (where "sets" is the prefixSet).
|
30 |
|