Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upInconsistent encoding of units in metric names #186
Comments
This comment has been minimized.
This comment has been minimized.
|
Since labels do come at a cost, IMO they should not be used for "documentation" purposes, i.e. for cases where they don't actually introduce new dimensionality. Unless you are exporting the same metric with different units (uncommon), a unit label wouldn't add any new dimension, so I'd rather advise against this and keep using a naming convention. |
This comment has been minimized.
This comment has been minimized.
|
I would suggest documenting a grammar for the naming convention then so we don't mix up "bytes_total" with "total_bytes", or "ms_elapsed" with "elapsed_milliseconds".
|
This comment has been minimized.
This comment has been minimized.
|
A WIP on conventions: https://github.com/prometheus/prometheus/wiki/Metric-and-Label-Conventions. |
This comment has been minimized.
This comment has been minimized.
|
Labels for units don't make sense, having them as metadata (similar to whether something is a counter or gauge) would be useful though. If we can get everyone on un-prefixed SI units as much as possible that'd be good. We already seem to have a mix of microseconds, milliseconds, and seconds. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil If you use unprefixed SI units (seconds in case of time) and you want to measure something in the nanosecond range, the result becomes much less readable though? |
This comment has been minimized.
This comment has been minimized.
|
I think that everything should be exported, stored and calculated in seconds - and only when rendering for human display to change to nanoseconds. This is similar logic to why you should always use unixtime when processing, and only apply timezones when rendering. |
This comment has been minimized.
This comment has been minimized.
|
This got resolved a while ago, closing. |
juliusv
closed this
Jan 8, 2015
simonpasquier
pushed a commit
to simonpasquier/prometheus
that referenced
this issue
Oct 12, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
streadway commentedApr 25, 2013
The lack of units for the counter scalars has lead to encoding them in the docstring, or metric name itself. Does it make sense to use a label for units? It seems we have a metric level special meaning for the "name" label, does this extend also to "units"?
Examples of confusing names with the units encoded in different locations in the names, and in the docstring.
namespace_metric_unitsvs.namespace_units_metric