Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add separate metrics for non-numeric fields #71

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Add separate metrics for non-numeric fields #71

merged 6 commits into from
Dec 10, 2024

Conversation

hansmi
Copy link
Owner

@hansmi hansmi commented Nov 26, 2024

Every report group (PV, VG, LV) had its own info metric where
non-numeric fields like pv_attr were reported as a label. Every unique
combination of labels produces a new time series. From
https://prometheus.io/docs/practices/naming/#labels:

Remember that every unique combination of key-value label pairs
represents a new time series, which can dramatically increase the
amount of data stored. Do not use labels to store dimensions with high
cardinality (many different label values), such as user IDs, email
addresses, or other unbounded sets of values.

With this change the labels on the info metrics are reduced to names
(e.g. pv_name and lv_full_name). Everything else is moved to
separate metrics.

A command line flag, enabled by default, retains the labels on the info
metric.

At present textual fields are reported as labels on the info metric
where every change creates a new time series. They should be reported as
separate metrics instead.
The flag has no implementation yet. That will follow in a separate
commit.
Every report group (PV, VG, LV) had its own info metric where
non-numeric fields like `pv_attr` were reported as a label. Every unique
combination of labels produces a new time series. From
https://prometheus.io/docs/practices/naming/#labels:

> Remember that every unique combination of key-value label pairs
> represents a new time series, which can dramatically increase the
> amount of data stored. Do not use labels to store dimensions with high
> cardinality (many different label values), such as user IDs, email
> addresses, or other unbounded sets of values.

With this change the labels on the info metrics are reduced to names
(e.g. `pv_name` and `lv_full_name`). Everything else is moved to
separate metrics.

A command line flag, enabled by default, retains the labels on the info
metric.

Related to issue #31.
@hansmi hansmi marked this pull request as draft November 26, 2024 22:11
@hansmi hansmi mentioned this pull request Nov 26, 2024
@hansmi hansmi marked this pull request as ready for review December 10, 2024 22:22
@hansmi hansmi merged commit ed6ce99 into main Dec 10, 2024
4 checks passed
@hansmi hansmi deleted the issue31 branch December 10, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant