Skip to content

[Bug]: unit labeling in charts are not consistent #1141

@ralphm

Description

@ralphm

Bug description

The labels of the unit on the y-axis of metric charts are inconsistent between charts, even though the unit looks to be the same. Also, sometimes prefixes are written out, and sometimes not.

Expected behavior

Using UCUM terminology and referring to the screenshots below, we should make a clear choice whether this shows a written out unit name (e.g. operations per second, percent), or a print symbol (operations/s, %).

Prefixes should be consistent with this, so instead of tebiBy either tebibytes or TiB. Note: By should not be shown at all, because this is the case-insensitive terminal unit symbol, that is used in storage and protocol (e.g. OTLP) only, and is not meant for display to the end user.

As the UCUM unit {inode} has a name and print symbol of inodes, this would need to be either thousand inodes or K inodes. Either ms and ms/s, or milliseconds and milliseconds per second.

Steps to reproduce

  1. Look at the charts in the screenshots

Screenshots

Image Image Image

Error Logs

No response

Desktop

Additional context

Most probably, the unit handling in netdata/charts should be adjusted to actually parse UCUM units (using https://github.com/lhncbc/ucum-lhc ?) with additional support for counts of things, as expressed using annotations. The OpenTelemetry project is quite specific about using singular forms in units for counts of things (like {operation}/s for "operations per second"). Our list of units/all.js could still contain a list of legacy units to proper UCUM units, as well as provide UCUM names and print symbols to counts of things, but should not have an entry for ms or KiBy, as those can be deconstructed by that library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions