MM-61887: Log the userID if a metric exceeds the last histogram bucket (#29448)
We create a custom histogram metric that logs the userID when the observed value is greater or equal to the last bucket value. This allows us to start tracking the slowest users of a system while at the same time not polluting the Prometheus metrics by storing a userID for every observation. https://mattermost.atlassian.net/browse/MM-61887 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
421001c981
Коммит
a6d37fa14c
@@ -15,7 +15,7 @@ import (
|
||||
func AssertLog(t *testing.T, logs io.Reader, level, message string) {
|
||||
t.Helper()
|
||||
if !hasMsg(t, logs, level, message) {
|
||||
assert.Failf(t, "failed to find %s log message: %s", level, message)
|
||||
assert.Failf(t, "failed to find", "Expected log_level: %s, log_message: %s", level, message)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func AssertLog(t *testing.T, logs io.Reader, level, message string) {
|
||||
func AssertNoLog(t *testing.T, logs io.Reader, level, message string) {
|
||||
t.Helper()
|
||||
if hasMsg(t, logs, level, message) {
|
||||
assert.Failf(t, "found %s log message: %s", level, message)
|
||||
assert.Failf(t, "found", "Not expected log_level: %s log_message: %s", level, message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user