Skip to content

Allow multiple exemplars on counters and histograms#2838

Open
dashpole wants to merge 3 commits intoprometheus:mainfrom
dashpole:multiple_exemplars
Open

Allow multiple exemplars on counters and histograms#2838
dashpole wants to merge 3 commits intoprometheus:mainfrom
dashpole:multiple_exemplars

Conversation

@dashpole
Copy link
Contributor

Fixes prometheus/OpenMetrics#311

Remove the restriction on having a single exemplar on counters. This matches PRW 2.0, OpenTelemetry, and makes exemplars more consistent between types.

While reading through exemplar language, I noticed the MUST requirement for histogram-bucket-aligned exemplars on fixed-bucket histograms. This relaxes (to SHOULD) the alignment of exemplars with histogram buckets. This is done because:

  • Consistency between types (counters, histograms, and native histograms support multiple exemplars without restrictions.
  • Reduces the amount of validation required by clients.
  • Allows native histograms and classic histograms to share exemplar sampling in Prometheus clients (when storing both types internally), without confining exemplars to the classic buckets.

Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

Please update the ABNF (I can help)

Signed-off-by: David Ashpole <dashpole@google.com>
Signed-off-by: David Ashpole <dashpole@google.com>
Signed-off-by: David Ashpole <dashpole@google.com>
Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM

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.

OM 2.0: All types MUST support multiple exemplars

3 participants

Comments