oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

Metrics: Include unit of measure in metrics metadata #6696

Open askfongjojo opened 1 month ago

askfongjojo commented 1 month ago

In view of #6634 and the many types of metrics we serve across the stack, it will be useful to have the unit of measure being a field/attribute so that users don't have to use documentation to decide how to label the metrics and automate the rendering with the right UOM.

This will also fill a potential gap if we support openmetrics or opentelemetry format - both of which appears to have units.

bnaecker commented 1 month ago

For some context, the units are defined in the TOML files containing the actual schema definitions today. This will be taken care of once we get #6005 and a few other PRs over the line. At that point, the timeseries schema in ClickHouse themselves can be populated with the units we already have, and that can be returned in a query as well.