prometheus / prometheus/client_rust

Missing GaugeWithExemplar

Open
#122 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
606
Forks
113
Avg merge
9h 7m
Merged PRs (30d)
8

Description

I want to have a GaugeWithExemplar that adds an exemplar whenever gauge derivates from zero. The actual use-case is making a flamegraph and putting it into the exemplar label, so that it can be easily found.

It seems like it would mostly be a copy of CounterWithExemplar, so I'm happy to make a PR if this makes sense.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing CounterWithExemplar implementation and its tests in the Rust client library. Use it to understand the expected exemplar API, then define the corresponding gauge behavior: add an exemplar when the gauge changes from zero. Done means the new GaugeWithExemplar supports the flamegraph label use case and has coverage for that transition.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.