Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new cortex_querier_codec_response_size histogram to track the size of the encoded Query responses #6444

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

alanprot
Copy link
Member

What this PR does:
We already have a similar metric cortex_querier_response_message_bytes_bucket but this metric shows the response size after the compression (gzip).

This new metric tracks the size of the request before the compression. This can be useful as the responses are decompressed on QF and it can cause OOM errors.

In a future PR we may wanna create an option to limit the size of the responses from Queriers, so we protect QF from OOM.

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]

@dosubot dosubot bot added component/querier type/observability To help know what is going on inside Cortex labels Dec 18, 2024
@alanprot alanprot force-pushed the instrumented-codec branch 2 times, most recently from 3d205b4 to 5b86448 Compare December 18, 2024 20:52
Signed-off-by: alanprot <[email protected]>
@alanprot alanprot requested a review from yeya24 December 18, 2024 21:19
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

This looks ok to me. We already log the querier response size (after compression) though.

pkg/querier/codec/instrumented_codec.go Show resolved Hide resolved
@alanprot
Copy link
Member Author

This looks ok to me. We already log the querier response size (after compression) though.

We also have metric after compression.. but i wanna a metric before compression as this reflects more the memory needed on the QF.

@alanprot alanprot changed the title Create new cortex_querier_codec_response_size_bucket histogram to track the size of the encoded responses from … Create new cortex_querier_codec_response_size histogram to track the size of the encoded Query responses Dec 18, 2024
@alanprot alanprot merged commit 132ccde into cortexproject:master Dec 18, 2024
17 checks passed
@alanprot alanprot deleted the instrumented-codec branch December 19, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/querier 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.

3 participants