Skip to content

Commit eea59c6

Browse files
committed
Improve metric name description
1 parent bb0a42b commit eea59c6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

manual/core/metrics/README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,6 @@ There are two categories of driver metrics:
131131
For example, `pool.open-connections` measures the number of connections open to this particular
132132
node.
133133

134-
Metric names are path-like, dot-separated strings. The driver prefixes them with the name of the
135-
session (see `session-name` in the configuration), and in the case of node-level metrics, `nodes`
136-
followed by a textual representation of the node's address. For example:
137-
138-
```
139-
s0.connected-nodes => 2
140-
s0.nodes.127_0_0_1:9042.pool.open-connections => 2
141-
s0.nodes.127_0_0_2:9042.pool.open-connections => 1
142-
```
143-
144134
To find out which metrics are available, see the [reference configuration]. It contains a
145135
commented-out line for each metric, with detailed explanations on its intended usage.
146136

@@ -171,10 +161,20 @@ The `advanced.metrics.id-generator.class` option is used to customize how the dr
171161
metric identifiers. The driver ships with two built-in implementations:
172162

173163
- `DefaultMetricIdGenerator`: generates identifiers composed solely of (unique) metric names; it
174-
does not generate tags. It is mostly suitable for use with metrics libraries that do not support
175-
tags, like Dropwizard.
176-
- `TaggingMetricIdGenerator`: generates identifiers composed of name and tags. It is mostly suitable
177-
for use with metrics libraries that support tags, like Micrometer or MicroProfile Metrics.
164+
does not generate tags. All metric names start with the name of the session (see `session-name` in
165+
the configuration), and in the case of node-level metrics, this is followed by `.nodes.`, followed
166+
by a textual representation of the node's address. All names end with the metric distinctive name.
167+
See below for examples. This generator is mostly suitable for use with metrics libraries that do
168+
not support tags, like Dropwizard.
169+
170+
- `TaggingMetricIdGenerator`: generates identifiers composed of a name and one or two tags.
171+
Session-level metric names start with the `session.` prefix followed by the metric distinctive
172+
name; node-level metric names start with the `nodes.` prefix followed by the metric distinctive
173+
name. Session-level tags will include a `session` tag whose value is the session name (see
174+
`session-name` in the configuration); node-level tags will include the same `session` tag, and
175+
also a `node` tag whose value is the node's address. See below for examples. This generator is
176+
mostly suitable for use with metrics libraries that support tags, like Micrometer or MicroProfile
177+
Metrics.
178178

179179
For example, here is how each one of them generates identifiers for the session metric "bytes-sent",
180180
assuming that the session is named "s0":

0 commit comments

Comments
 (0)