Commit a17f7581 authored by Brian Brazil's avatar Brian Brazil Committed by GitHub

Unit examples should be seconds for time

parent e0dd6ded
...@@ -23,11 +23,11 @@ A metric name... ...@@ -23,11 +23,11 @@ A metric name...
(specific to the Prometheus server) (specific to the Prometheus server)
* <code><b>process</b>\_cpu\_seconds\_total</code> * <code><b>process</b>\_cpu\_seconds\_total</code>
(exported by many client libraries) (exported by many client libraries)
* <code><b>http</b>\_request\_duration\_microseconds</code> * <code><b>http</b>\_request\_duration\_seconds</code>
(for all HTTP requests) (for all HTTP requests)
* ...must have a single unit (i.e. do not mix seconds with milliseconds). * ...must have a single unit (i.e. do not mix seconds with milliseconds, or seconds with bytes).
* ...should have a suffix describing the unit, in plural form. Note that an accumulating count has `total` as a suffix, in addition to the unit if applicable. * ...should have a suffix describing the unit, in plural form. Note that an accumulating count has `total` as a suffix, in addition to the unit if applicable.
* <code>http\_request\_duration\_<b>microseconds</b></code> * <code>http\_request\_duration\_<b>seconds</b></code>
* <code>node\_memory\_usage\_<b>bytes</b></code> * <code>node\_memory\_usage\_<b>bytes</b></code>
* <code>http\_requests\_<b>total</b></code> * <code>http\_requests\_<b>total</b></code>
(for a unit-less accumulating count) (for a unit-less accumulating count)
...@@ -50,7 +50,7 @@ queue with the current number of elements in the queue is not. ...@@ -50,7 +50,7 @@ queue with the current number of elements in the queue is not.
Use labels to differentiate the characteristics of the thing that is being measured: Use labels to differentiate the characteristics of the thing that is being measured:
* `api_http_requests_total` - differentiate request types: `type="create|update|delete"` * `api_http_requests_total` - differentiate request types: `type="create|update|delete"`
* `api_request_duration_nanoseconds` - differentiate request stages: `stage="extract|transform|load"` * `api_request_duration_seconds` - differentiate request stages: `stage="extract|transform|load"`
Do not put the label names in the metric name, as this introduces redundancy Do not put the label names in the metric name, as this introduces redundancy
and will cause confusion if the respective labels are aggregated away. and will cause confusion if the respective labels are aggregated away.
......
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