Skip to content

[RW2] Return 400 for Exemplars without Series or Histograms not written#17250

Merged
bwplotka merged 2 commits into
prometheus:mainfrom
pipiland2612:RW2_Exemplar
Oct 6, 2025
Merged

[RW2] Return 400 for Exemplars without Series or Histograms not written#17250
bwplotka merged 2 commits into
prometheus:mainfrom
pipiland2612:RW2_Exemplar

Conversation

@pipiland2612

@pipiland2612 pipiland2612 commented Oct 1, 2025

Copy link
Copy Markdown
Contributor

Which issue(s) does the PR fix:

Fixes #17247

Does this PR introduce a user-facing change?

[BUGFIX] Remote write 2.0 handler, return 400 for exemplars without series or histograms instead of a silent drop of exemplar data.

Signed-off-by: pipiland2612 <[email protected]>
Signed-off-by: pipiland2612 <[email protected]>
@bboreham

bboreham commented Oct 1, 2025

Copy link
Copy Markdown
Member

I think users would notice this change.

@pipiland2612

Copy link
Copy Markdown
Contributor Author

I think users would notice this change.

Thanks for suggesting. I have fixed the description now

@roidelapluie

Copy link
Copy Markdown
Member

I am not sure if we should return this or ingest the exemplar. @krajorama what is your opinion?

@bwplotka bwplotka 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.

LGTM, thanks!

As per RW 2 spec sample or histogram must be provided, so it's an invalid message.

For PRW 1, since we silently dropped, we might as well indicate a problem 👍🏽 (it's only for RW2)

At least one element in samples or in histograms MUST be provided. A TimeSeries MUST NOT include both samples and histograms. For series which (rarely) would mix float and histogram samples, a separate TimeSeries message MUST be used.

@bwplotka

bwplotka commented Oct 6, 2025

Copy link
Copy Markdown
Member

I updated release note item to [BUGFIX] Remote write 2.0 handler, return 400 for exemplars without series or histograms instead of a silent drop of exemplar data.

@bwplotka
bwplotka merged commit 106e6f2 into prometheus:main Oct 6, 2025
30 checks passed
@pipiland2612
pipiland2612 deleted the RW2_Exemplar branch October 6, 2025 11:54
@krajorama

Copy link
Copy Markdown
Member

LGTM, thanks!

As per RW 2 spec sample or histogram must be provided, so it's an invalid message.

ok, that's clear

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.

RW2: Exemplars without Series or Histograms are not written despite Prometheus returning 2.x

5 participants