Fix streams limit error check so that metrics are correctly labeled as ReasonStreamLimited#3466
Merged
kalleep merged 3 commits intografana:mainfrom Apr 30, 2025
Merged
Conversation
kalleep
reviewed
Apr 29, 2025
kalleep
reviewed
Apr 29, 2025
Contributor
|
@maratkhv mind doing a rebase on main? |
87cdc52 to
e0e78e6
Compare
kalleep
approved these changes
Apr 30, 2025
kalleep
pushed a commit
that referenced
this pull request
May 5, 2025
…s `ReasonStreamLimited` (#3466) * fix: replace direct error string compare with isErrMaxStreamsLimitExceeded helper * update CHANGELOG * Make errMaxStreamsLimitExceeded an error type
kalleep
added a commit
that referenced
this pull request
May 5, 2025
* fix: panic that happens when a target gets deleted when using decompression (#3475) * Fix panic caused that can happen when when file is removed for decompressor * Change to start readLine start and stops updatePositions * Add changelog * Fix mimir.rules.kubernetes panic on non-leader debug info retrieval (#3451) * Fix mimir.rules.kubernetes to only return eventProcessor state if it exists * fix: deadlock in loki.source.file when target is removed (#3488) * Fix deadlock that can happen when stopping reader tasks Co-authored-by: William Dumont <william.dumont@grafana.com> * fix: emit valid logfmt key (#3495) * Fix log keys to be valid for logfmt * Add changelog * Fix streams limit error check so that metrics are correctly labeled as `ReasonStreamLimited` (#3466) * fix: replace direct error string compare with isErrMaxStreamsLimitExceeded helper * update CHANGELOG * Make errMaxStreamsLimitExceeded an error type --------- Co-authored-by: Théo Brigitte <theo.brigitte@gmail.com> Co-authored-by: William Dumont <william.dumont@grafana.com> Co-authored-by: Marat Khvostov <marathvostov@gmail.com>
marctc
pushed a commit
that referenced
this pull request
May 7, 2025
…s `ReasonStreamLimited` (#3466) * fix: replace direct error string compare with isErrMaxStreamsLimitExceeded helper * update CHANGELOG * Make errMaxStreamsLimitExceeded an error type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
This PR fixes an issue where such error check
if err.Error() == errMaxStreamsLimitExceeded { reason = ReasonStreamLimited }would always fail because batch.add() returns a formatted error, so the metrics are not labeled properly.
Which issue(s) this PR fixes
Notes to the Reviewer
HasPrefixcheck is sufficient.PR Checklist