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

rename metric label values for fetched-data limit rejections#7517
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
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@SungJin1212 SungJin1212 force-pushed the Rename-reason-label-values branch from ae41fd9 to 081be7e Compare May 14, 2026 07:51
Copy link
Copy Markdown
Member

@friedrichg friedrichg left a comment

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?

Copy link
Copy Markdown
Member Author

@SungJin1212 SungJin1212 May 15, 2026

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.

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

Labels

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.

2 participants