UNPKG

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