Metoro uses the Unified Code for Units of Measure (UCUM) standard for representing metric units. This ensures consistent and unambiguous unit representation across all metrics, whether they’re automatically generated by Metoro or custom metrics sent via OpenTelemetry.

Setting Units

Units can be specified at different levels in Metoro:

  1. Source Units: The unit exported with the metric itself, declared at the metric instantiation time in the emitting service.
  2. Metric Catalog Override: A global unit override that can be set in the Metric Catalog for any metric.
  3. Chart Level Override: A unit override that can be set at the individual chart level when creating or editing a chart.

When displaying metrics, the unit is determined by the following precedence:

  1. Chart Level Override: If a chart has a specific unit override, that unit is used for display.
  2. Metric Catalog Override: If no chart-level override exists, the unit defined in the Metric Catalog for that metric is used.
  3. Source Unit: If neither of the above overrides exists, the unit specified in the metric source is used.
  4. Default Unit: If no unit is specified at any level, Metoro will use the dimensionless unit 1 (no unit).

Ideally you should always set a unit at the metric source level, as this provides the most accurate representation of the metric’s meaning. However, this is not always possible, for example when using third-party libraries, exporter services etc. In these cases, you should add a unit override in the Metric Catalog level. This will ensure that all charts using this metric will display the correct unit. Finally, if you need to add a unit override for a specific chart, you can do so in the chart settings. This is often useful when combining multiple metrics with different units in the same chart, or when you want to display a metric in a different unit for a specific audience or use case.

Custom Units

If you need to use a unit that’s not in the standard UCUM list, Metoro allows you to specify custom units. When setting a unit override in the UI, you can type any string value and it will be accepted as a custom unit.

Custom units are useful for:

  • Domain-specific measurements
  • Business metrics with specialized units
  • Temporary units during development

To use a custom unit:

  1. In the unit selector dropdown, type your custom unit name
  2. Press Enter or select the “(custom)” option that appears
  3. The custom unit will be used for display

Note: Custom units won’t have automatic scaling or conversion capabilities like standard UCUM units.

Unit Conversion and Display

Metoro automatically converts units for optimal display:

  • Large byte values are converted to KiB, MiB, GiB, etc.
  • Time values are converted to appropriate scales (ms to seconds, seconds to minutes, etc.)
  • Timestamps are displayed as human-readable dates
  • Currency values are displayed with K/M/B/T suffixes for thousands/millions/billions/trillions

This automatic scaling ensures that values are always displayed in a human-readable format without losing precision.

Mixing multiple Units in a Chart

If all constituent visible metrics in a chart have the same unit, that unit will be used for the y axis label. If the metrics have different units, there will be no y axis label. Each constituent metric will have its own unit label visible in the tooltip when hovering over datapoints.

UCUM Unit Reference

If you are defining the unit in your metric source, you can use any of the standard UCUM units. Metoro supports a wide range of units across different categories, including:

Dimensionless

  • 1 - dimensionless (no unit)
  • % - percent

Application Metrics

  • {requests}/s - requests per second
  • {errors}/s - errors per second
  • {ops}/s - operations per second
  • {transactions}/s - transactions per second
  • {packets}/s - packets per second
  • {messages}/s - messages per second
  • {events}/s - events per second

Information (Binary - Base 1024)

  • By - byte
  • KiBy - kibibyte (1024 bytes)
  • MiBy - mebibyte (1024² bytes)
  • GiBy - gibibyte (1024³ bytes)
  • TiBy - tebibyte (1024⁴ bytes)
  • PiBy - pebibyte (1024⁵ bytes)

Information (Decimal - Base 1000)

  • bit - bit
  • kBy - kilobyte (1000 bytes)
  • MBy - megabyte (10⁶ bytes)
  • GBy - gigabyte (10⁹ bytes)
  • TBy - terabyte (10¹² bytes)
  • PBy - petabyte (10¹⁵ bytes)

Data Rate

Binary (Base 1024)

  • By/s - bytes per second
  • KiBy/s - kibibytes per second
  • MiBy/s - mebibytes per second
  • GiBy/s - gibibytes per second
  • TiBy/s - tebibytes per second

Decimal (Base 1000)

  • kBy/s - kilobytes per second
  • MBy/s - megabytes per second
  • GBy/s - gigabytes per second

Bits

  • bit/s - bits per second
  • kbit/s - kilobits per second
  • Mbit/s - megabits per second
  • Gbit/s - gigabits per second

System Resources

  • {connections} - active connections
  • {threads} - active threads
  • {processes} - active processes
  • {users} - active users
  • {sessions} - active sessions
  • {CPU} - CPU cores
  • %{CPU} - CPU usage percentage
  • %{memory} - memory usage percentage
  • %{disk} - disk usage percentage
  • %{network} - network usage percentage

Time

  • ns - nanosecond
  • us - microsecond (μs)
  • ms - millisecond
  • s - second
  • min - minute
  • h - hour
  • d - day
  • wk - week
  • mo - month
  • a - year

Frequency

  • Hz - hertz
  • kHz - kilohertz
  • MHz - megahertz
  • GHz - gigahertz
  • /s - per second
  • /min - per minute
  • /h - per hour
  • /d - per day

Timestamps

  • unix_s - Unix timestamp (seconds)
  • unix_ms - Unix timestamp (milliseconds)
  • unix_us - Unix timestamp (microseconds)
  • unix_ns - Unix timestamp (nanoseconds)

Temperature

  • K - kelvin
  • Cel - Celsius (°C)
  • [degF] - Fahrenheit (°F)

Power

  • W - watt
  • kW - kilowatt
  • MW - megawatt
  • GW - gigawatt
  • [hp] - horsepower

Electric Units

Voltage

  • V - volt
  • mV - millivolt
  • kV - kilovolt

Current

  • A - ampere
  • mA - milliampere
  • A.h - ampere hour
  • mA.h - milliampere hour

Resistance

  • Ohm - ohm (Ω)
  • kOhm - kiloohm (kΩ)
  • MOhm - megaohm (MΩ)

Capacitance

  • F - farad
  • uF - microfarad (μF)
  • nF - nanofarad
  • pF - picofarad

Inductance

  • H - henry
  • mH - millihenry
  • uH - microhenry (μH)

Charge

  • C - coulomb

Physical Units

Length

  • Metric: nm, um, mm, cm, dm, m, km
  • Imperial: [in_i], [ft_i], [yd_i], [mi_i]

Mass

  • Metric: ng, ug, mg, g, kg, t
  • Imperial: [oz_av], [lb_av]

Area

  • Metric: mm2, cm2, m2, km2, har (hectare)
  • Imperial: [sin_i], [sft_i]

Volume

  • Metric: ml, l, m3
  • Imperial: [foz_us], [pt_us], [qt_us], [gal_us]

Speed

  • m/s - meters per second
  • km/h - kilometers per hour
  • [mi_i]/h - miles per hour
  • [kn_i] - knot

Force

  • N - newton
  • kN - kilonewton
  • [lbf_av] - pound force

Pressure

  • Pa - pascal
  • kPa - kilopascal
  • MPa - megapascal
  • bar - bar
  • mbar - millibar
  • atm - atmosphere
  • mm[Hg] - millimeter of mercury
  • [psi] - pounds per square inch

Energy

  • J - joule
  • kJ - kilojoule
  • MJ - megajoule
  • cal - calorie
  • kcal - kilocalorie
  • W.h - watt hour
  • kW.h - kilowatt hour
  • MW.h - megawatt hour
  • [Btu_IT] - British thermal unit

Concentration

  • mol/l - molar
  • mmol/l - millimolar
  • umol/l - micromolar (μmol/l)
  • nmol/l - nanomolar
  • g/l - grams per liter
  • mg/l - milligrams per liter
  • ug/l - micrograms per liter (μg/l)
  • ng/l - nanograms per liter

Currency

Metoro supports major world currencies:

  • {USD} - US Dollar
  • {EUR} - Euro
  • {GBP} - British Pound
  • {JPY} - Japanese Yen
  • {CNY} - Chinese Yuan
  • {CHF} - Swiss Franc
  • {CAD} - Canadian Dollar
  • {AUD} - Australian Dollar
  • And many more…

Currency rates (per time unit):

  • {USD}/s - USD per second
  • {USD}/min - USD per minute
  • {USD}/h - USD per hour
  • {USD}/d - USD per day
  • {USD}/mo - USD per month