Commit 2220efe7 authored by Ben Kochie's avatar Ben Kochie Committed by Brian Brazil

Clarify use of colons in metric names (#1147)

* Make sure to mention that colons are reserved in the data model.
* Cleanup wording to explain what "users" means.
Signed-off-by: 's avatarBen Kochie <superq@gmail.com>
parent 5102bb3f
...@@ -21,6 +21,9 @@ The _metric name_ specifies the general feature of a system that is measured ...@@ -21,6 +21,9 @@ The _metric name_ specifies the general feature of a system that is measured
may contain ASCII letters and digits, as well as underscores and colons. It may contain ASCII letters and digits, as well as underscores and colons. It
must match the regex `[a-zA-Z_:][a-zA-Z0-9_:]*`. must match the regex `[a-zA-Z_:][a-zA-Z0-9_:]*`.
Note: The colons are reserved user defined recording rules. They should not
be used by exporters or direct instrumentation.
Labels enable Prometheus's dimensional data model: any given combination of Labels enable Prometheus's dimensional data model: any given combination of
labels for the same metric name identifies a particular dimensional labels for the same metric name identifies a particular dimensional
instantiation of that metric (for example: all HTTP requests that used the instantiation of that metric (for example: all HTTP requests that used the
......
...@@ -125,8 +125,8 @@ Converting `camelCase` to `snake_case` is desirable, though doing so ...@@ -125,8 +125,8 @@ Converting `camelCase` to `snake_case` is desirable, though doing so
automatically doesn’t always produce nice results for things like automatically doesn’t always produce nice results for things like
`myTCPExample` or `isNaN` so sometimes it’s best to leave them as-is. `myTCPExample` or `isNaN` so sometimes it’s best to leave them as-is.
Exposed metrics should not contain colons, these are reserved for users Exposed metrics should not contain colons, these are reserved for user
to use when aggregating. defined recording rules to use when aggregating.
Only `[a-zA-Z0-9:_]` are valid in metric names, any other characters Only `[a-zA-Z0-9:_]` are valid in metric names, any other characters
should be sanitized to an underscore. should be sanitized to an underscore.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment