Add tags for ip blocklisted metric

This commit is contained in:
9seconds
2022-03-21 13:42:13 +03:00
parent aa7e488a3a
commit 534d5b755e
7 changed files with 68 additions and 16 deletions
+7 -2
View File
@@ -113,8 +113,13 @@ func (s statsdProcessor) EventConcurrencyLimited(_ mtglib.EventConcurrencyLimite
s.client.Incr(MetricConcurrencyLimited, 1)
}
func (s statsdProcessor) EventIPBlocklisted(_ mtglib.EventIPBlocklisted) {
s.client.Incr(MetricIPBlocklisted, 1)
func (s statsdProcessor) EventIPBlocklisted(evt mtglib.EventIPBlocklisted) {
tag := TagIPListBlock
if !evt.IsBlockList {
tag = TagIPListAllow
}
s.client.Incr(MetricIPBlocklisted, 1, statsd.StringTag(TagIPList, tag))
}
func (s statsdProcessor) EventReplayAttack(_ mtglib.EventReplayAttack) {