Skip to content

rename metric label values for fetched-data limit rejections - #7517

Open
SungJin1212 wants to merge 1 commit into
cortexproject:masterfrom
SungJin1212:Rename-reason-label-values
Open

SungJin1212 wants to merge 1 commit into
cortexproject:masterfrom
SungJin1212:Rename-reason-label-values

Conversation

@SungJin1212

Copy link
Copy Markdown
Member

This PR updates the naming of cortex_rejected_queries_total metric label values to make them more descriptive and consistent.

  • Old values: series_fetched, chunks_fetched, chunk_bytes_fetched, data_bytes_fetched.
  • New values: fetched_series_exceeded, fetched_chunks_exceeded, fetched_chunk_bytes_exceeded, fetched_data_bytes_exceeded.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

@dosubot dosubot Bot added the type/observability To help know what is going on inside Cortex label May 14, 2026
@SungJin1212
SungJin1212 force-pushed the Rename-reason-label-values branch from ae41fd9 to 081be7e Compare May 14, 2026 07:51

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

This will break people's dashboards and alerts for no immediate gain.
Can you clarify why is this necessary?

reasonResourceExhausted = "resource_exhausted"
reasonTimeRangeExceeded = "time_range_exceeded"
reasonResponseSizeExceeded = "response_size_exceeded"
reasonTooManySamples = "too_many_samples"

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.

shouldn't this also be fetch_too_many_samples_exceeded?

@SungJin1212 SungJin1212 May 15, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This might break existing dashboards and alerts. However, I realized that the existing values cannot clearly explain why the query is being rejected (these are label values of the reason).

I think the too_many_samples is clear enough to explain why the query is rejected.
The fetch_too_many_samples_exceeded is clearer, but I'd prefer to keep the changes to a minimum.

@friedrichg
friedrichg dismissed their stale review May 15, 2026 23:50

I won't block it. But I am not convinced yet either

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 21, 2026
reasonFetchedSeriesExceeded = "fetched_series_exceeded"
reasonFetchedChunksExceeded = "fetched_chunks_exceeded"
reasonFetchedChunkBytesExceeded = "fetched_chunk_bytes_exceeded"
reasonFetchedDataBytesExceeded = "fetched_data_bytes_exceeded"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is incompatible. Do we have to introduce customer impacting changes here? Can we do it in a way without breaking

@SungJin1212
SungJin1212 requested a review from a team as a code owner November 20, 2026 02:05
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@SungJin1212
SungJin1212 force-pushed the Rename-reason-label-values branch from 62e2ce5 to b743d44 Compare November 20, 2026 02:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/M type/observability To help know what is going on inside Cortex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants