Skip to content

Support migration to Prometheus 3 le normalized buckets #1611

@pharaujo

Description

@pharaujo

One of the breaking changes in Prometheus 3 is the normalization of le buckets to float, and this impacts Pyrra latency SLO recording rules. We've been preparing for the migration by changing PromQL expressions that target specific buckets to regular expression matches that would work both in Prometheus 2 and 3, like this: le="2" -> le=~"2(\\.0)?". While this works correctly for normal Prometheus rules and dashboards, Pyrra SLOs validate the le label value is a proper number, so we can't use this strategy to ensure a smooth migration.

I'm thinking that it would be fairly straightforward to add a --enable-prometheus3-migration flag that would change the le target label to the mentioned regex; that way the SLO definitions wouldn't need to change, the value validation would continue to work as it is, but the produced Prometheus rules would support the migration.

Is this something that the project would be interested in having? I'm interested in implementing it, as it would be useful for us!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions