Werk #18108: OTel: Include unit in metric name

Component Checks & agents
Title OTel: Include unit in metric name
Date Jun 16, 2025
Level Trivial Change
Class New Feature
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
2.5.0b1
Not yet released
Checkmk Cloud (CCE), Checkmk MSP (CME)
2.4.0p5 Checkmk Cloud (CCE), Checkmk MSP (CME)

Previously any graphs created from OpenTelemetry data points did not contain any information about the unit of the metric. Now the unit is part of the Checkmk metric name and as such displayed in the title of the metric graph.

This extends the naming convention for Checkmk metrics created from OTel data points introduced in werk #18209. The logic is now: 1. Alphabetically sorted <key>_<value> pairs of data point attributes, where leading namespaces are stripped from the key such that only unique keys remain 2. Concatenate these pairs with __ as separator 3. Add the unit as a suffix with __ as separator. If the unit does not exist or is the default unit 1, this is skipped. 4. If a rate is to be calculated for a metric (e.g. monotonic counters), add a __per_sec suffix 5. Replace special characters, which are not allowed in metric names in Checkmk, with _

Please note that because of this change, metrics which were previously created by the OpenTelemetry integration, will no longer be supplied with data. Instead, new metrics following this new naming convention will be created.

To the list of all Werks