-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: dimensional metrics for elasticsearch.events.processed
metric
#54
Conversation
@@ -411,7 +411,7 @@ func TestAppenderFlushMetric(t *testing.T) { | |||
if !ignoreCount { | |||
assert.Equal(t, count, int(dp.Count)) | |||
} else { | |||
assert.Greater(t, int(dp.Count), count) | |||
assert.GreaterOrEqual(t, int(dp.Count), count) |
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.
I debugged it locally with the main branch, and it also quite often emits 2 counts here, it should be ok to expect greater or equal than 2 if I'm not mistaken.
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.
LGTM, just a couple of nitpicks. Thanks!
Co-authored-by: Andrew Wilkins <[email protected]>
Instead of creating several metrics having status in names, create a single metric with different attributes/dimensions.
Before -> after
elasticsearch.events.processed
->elasticsearch.events.processed {status: "Success"}
elasticsearch.failed.client.count
->elasticsearch.events.processed {status: "FailedClient"}
elasticsearch.failed.server.count
->elasticsearch.events.processed {status: "FailedServer"}
elasticsearch.failed.too_many_reqs
->elasticsearch.events.processed {status: "TooMany"}
The outcome of it is the same with the #53, but it uses synchronous instruments instead.