[core] Collector and Checks metrics Governor #1468
Closed
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.
Collector and Checks metrics Governor is ready for review !
What is a Limiter ?
A limiter is a rule set to monitor the metric stream.
It is defined by:
scope
: scope where the rule appliesselection
: selection where the rule applieslimit
: limit of selections per scope.scope
andselection
are defined as subset of['name', 'agent', 'check', 'tags']
and allow to definecustom rules.
For instance
'scope' = ('name', 'check') selection = 'tags'
monitors number of tags per (metric name, check)'scope' = 'agent'
selection = 'name'
monitors globally the number of metrics namesLimiters keep tracks of 'active' selections (see point below), i.e. metrics's met selections on a sliding window, and count the number of metrics exceeding the limit set.
What an 'active' selection ?
A selection is considered as 'active', if it has been met at least once during the last
X
metrics stream batch processing, whereX
is a settable parameter.What is a Governor ?
A Governor supervises multiple limiters: submitting metric stream batches for checks, and reporting when an anomaly is detected.
Governors are split in two categories
Supervise
check
scoped limiters.Supervise wide scoped limiters.
When a limiter hit the active selections limit, a warning is post to Datadog.
Notes
For now the Governor is ready-only and does not alterate any payload.
TO-DO