Skip to content

OTLP: de-duplicate target_info samples with conflicting timestamps#17400

Merged
aknuds1 merged 3 commits intoprometheus:mainfrom
aknuds1:arve/dedup-target-info
Oct 28, 2025
Merged

OTLP: de-duplicate target_info samples with conflicting timestamps#17400
aknuds1 merged 3 commits intoprometheus:mainfrom
aknuds1:arve/dedup-target-info

Conversation

@aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Oct 24, 2025

Which issue(s) does the PR fix:

The PR adds logic to the target_info metric generation in the OTLP endpoint, so that any samples with the same timestamp for the same (target_info) series are de-duplicated. It comes out of a user's bug report about duplicated target_info samples in Grafana Mimir (which uses the Prometheus target_info generation logic).

If I'm not mistaken, duplicate target_info samples should stem from multiple resources in the same OTLP request being translated to the same target_info label set. It shouldn't be caused by a Prometheus bug.

Does this PR introduce a user-facing change?

[ENHANCEMENT] OTLP: De-duplicate any `target_info` samples with the same timestamp for the same series.

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 force-pushed the arve/dedup-target-info branch from 8294842 to 68f7733 Compare October 24, 2025 15:26
@aknuds1 aknuds1 requested a review from jesusvazquez October 28, 2025 09:55
Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

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

LGTM

@aknuds1 aknuds1 force-pushed the arve/dedup-target-info branch from b214bd6 to f898cef Compare October 28, 2025 10:53
@aknuds1 aknuds1 enabled auto-merge (squash) October 28, 2025 12:22
@aknuds1 aknuds1 disabled auto-merge October 28, 2025 13:33
@aknuds1 aknuds1 enabled auto-merge (squash) October 28, 2025 13:33
@aknuds1 aknuds1 merged commit c36e966 into prometheus:main Oct 28, 2025
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants