Skip to content

OM 2.0: Consider using complex values instead of suffixes #283

Open
@dashpole

Description

@dashpole

This deserves its own proposal, but i'll outline the broad idea here start the discussion and gather high-level feedback.

Idea

The idea is that we could use complex values for fixed bucket histograms, summaries, and counters, similar to what we plan to do for native histograms. In OM 1.0 and in the Prometheus text format, those types are represented using multiple series with suffixes and special labels (e.g. _bucket suffix, or the le label for histograms). Counters are included here because they have a "total" and a "start time".

Advantages

Disadvantages

  • Breaks existing user expectations and queries. Suffixes are very deeply embedded in the Prometheus ecosystem, and this would be a large change for many users.
  • PromQL queries become more complicated because accessing fields requires functions.
    • E.g. sum(request_duration_seconds_count) -> histogram_count(sum(request_duration_seconds)).
    • This would happen anyways if the user migrates to native histograms.
  • Little benefit for summaries and histograms, as we expect/recommend users adopt native histograms anyways.
  • Is there a text format representation that is readable AND easy to generate AND efficient enough to parse, for such a model?
  • It would make OM 2.0 text significantly different to 1.0 and Prometheus text, so some education and big change in parsers/generators would be needed. Not a blocker, but something to keep in mind as a con.

Alternatives

We could only use a complex value for counters, to support the start time in addition to the value. For fixed-bucket histograms and summaries, keep the existing suffixes and labels, but use the "complex counter" value for cumulative series. For users that have migrated from summaries and fixed-bucket histograms to native histograms, this has most of the advantages of the above, without many of the disadvantages for users using summaries or fixed-bucket histograms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage:deciding:needs-infoOpen to community discussion. May be accepted after sufficient reasoning is provided.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions