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.
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
Meta-monitoring based active series limiting #5520
Meta-monitoring based active series limiting #5520
Changes from all commits
916d4b3
123eab2
f280b52
f28f3e2
eebb9f4
86e3ee1
151635d
d8e2118
9511bd1
9e81fc4
903f5d2
bcf2b2b
7eae42d
2f1cc34
12be6a9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, are we taking into consideration this could be the first request from a new tenant? That should not be considered an error I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this error is not explicit (due to best-effort limiting), we only log this error. There doesn't seem to be a neat way of detecting that this is the first request of a tenant via Handler. Also, in case a tenant sends multiple request before we have had a chance to query meta-monitoring, all those requests would log errors, even if we detect first one.
WDYT would be a good way of handling this? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm that is true that we could receive multiple requests before the 15 second interval from a new tenant, feels like that's simply shortcoming of the meta-monitoring approach. Either way, are there other cases where a tenant would be missing from the map, apart from the case of new tenant? In that case I'd not consider it an error but simply return
true
without error and let the tenant have it "for free" before we query meta-monitoring.One thing that comes to my mind would be using a channel to signal to the querying goroutine to fire off, once we detect a request from new tenant has been ingested? Might be easier said than done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try this out. But another reason why a tenant may not be in the map is that meta-monitoring does not have metrics for one instance of a Receive, thereby completely missing a few tenants. In which case such an error log could be a clue. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm right I have not thought about hard tenancy 🤔. Could we detect within meta-monitoring if we have metrics for expected number of receiver instances and if not warn about it?