Skip to content

feat: Add custom labels to exemplars - #2191

Merged
zeitlinger merged 2 commits into
mainfrom
exemplar-labels-clean
Jun 8, 2026
Merged

feat: Add custom labels to exemplars#2191
zeitlinger merged 2 commits into
mainfrom
exemplar-labels-clean

Conversation

@jaydeluca

Copy link
Copy Markdown
Member

Resolves#1994

@jaydeluca
jaydelucaforce-pushed the exemplar-labels-clean branch from c98d047 to 4220f82CompareJune 4, 2026 19:38
@jaydeluca
jaydeluca marked this pull request as ready for review June 4, 2026 19:50

@zeitlingerzeitlinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One review item: the new exemplar label suppliers are documented as applying to automatically-sampled exemplars, but the current implementation also injects them into custom exemplars via updateCustomExemplar(). That changes the semantics of observeWithExemplar/incWithExemplar, which no longer remain fully caller-controlled when a global supplier is installed. Please avoid merging the extra supplier labels on the custom-exemplar path (while keeping trace/span enrichment if desired).

jaydelucaand others added 2 commits June 5, 2026 09:58
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
Signed-off-by: Jay DeLuca <jaydeluca4@gmail.com>
@jaydeluca
jaydelucaforce-pushed the exemplar-labels-clean branch from efbcfb8 to 0e8dfb6CompareJune 5, 2026 13:58
@jaydeluca
jaydeluca requested a review from zeitlingerJune 8, 2026 12:49
@zeitlinger
zeitlinger merged commit fd1f3e8 into mainJun 8, 2026
21 checks passed
@zeitlinger
zeitlinger deleted the exemplar-labels-clean branch June 8, 2026 14:58
@github-actionsgithub-actionsBot mentioned this pull request Jun 8, 2026
zeitlinger added a commit that referenced this pull request Jun 11, 2026
🤖 I have created a release *beep* *boop*
---
##
[1.8.0](v1.7.0...v1.8.0)
(2026-06-11)
### Features
* Add custom labels to exemplars
([#2191](#2191))
([fd1f3e8](fd1f3e8))
* add MetricMetadata.Builder, deprecate wide constructors
([#2202](#2202))
([adeef32](adeef32))
### Bug Fixes
* Avoid unnuecessary exemplar allocations
([#2209](#2209))
([0b6a91f](0b6a91f))
* **deps:** update spring boot to v4.1.0
([#2213](#2213))
([df25c08](df25c08))
### Documentation
* cover typed family descriptors and @stableAPI since v1.6.1
([#2181](#2181))
([7ca9f99](7ca9f99))
---
> [!IMPORTANT]
> Close and reopen this PR to trigger CI checks.
---------
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Sign up for freeto 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.

Is it possible to add a custom metadata identifier when using Exemplars?

2 participants

@jaydeluca@zeitlinger