Skip to content

highlight le and quantile label values normalization in Prom 3.0#2572

Merged
beorn7 merged 1 commit intoprometheus:mainfrom
machine424:normal
Jan 21, 2025
Merged

highlight le and quantile label values normalization in Prom 3.0#2572
beorn7 merged 1 commit intoprometheus:mainfrom
machine424:normal

Conversation

@machine424
Copy link
Member

* Labels with an empty label value are considered equivalent to labels that do not exist.

NOTE: Beginning with Prometheus v3.0, the values of the `le` label of classic
histograms and the `quantile` label in summaries are consistently normalized to
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are invariably? always?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a good location for this factoid. The normalization is just an ingestion concern. Non-normalized le and quantile labels still fit the data model (and they even work with PromQL, it's just inconvenient if you have a mix of differently formatted le and quantile labels).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was just to give it more visibility, if you provided with le=1 and you ended up with le=1.0, that's the reason.
Removed.

* Labels with an empty label value are considered equivalent to labels that do not exist.

NOTE: Beginning with Prometheus v3.0, the values of the `le` label of classic
histograms and the `quantile` label in summaries are consistently normalized to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a good location for this factoid. The normalization is just an ingestion concern. Non-normalized le and quantile labels still fit the data model (and they even work with PromQL, it's just inconvenient if you have a mix of differently formatted le and quantile labels).

Comment on lines +82 to +83
NOTE: Beginning with Prometheus v3.0, the values of the `le` label of classic
histograms is consistently normalized to a float-like representation upon ingestion.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Float-like representation" is pretty vague. How about this:

Suggested change
NOTE: Beginning with Prometheus v3.0, the values of the `le` label of classic
histograms is consistently normalized to a float-like representation upon ingestion.
NOTE: Beginning with Prometheus v3.0, the values of the `le` label of classic
histograms are normalized during ingestion to follow the format of [OpenMetrics Canonical Numbers](https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#considerations-canonical-numbers).

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
Co-authored-by: beorn7 <beorn@grafana.com>
@beorn7 beorn7 merged commit 1d8da9d into prometheus:main Jan 21, 2025
1 check passed
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.

2 participants