-
Notifications
You must be signed in to change notification settings - Fork 4.6k
stats/otel: Add up down counter for A94 #8581
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
base: master
Are you sure you want to change the base?
Conversation
20f43a0
to
e4d9b0e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8581 +/- ##
==========================================
- Coverage 81.64% 80.48% -1.17%
==========================================
Files 413 413
Lines 40621 40933 +312
==========================================
- Hits 33167 32946 -221
- Misses 5991 6286 +295
- Partials 1463 1701 +238
🚀 New features to boost your workflow:
|
Please follow the instructions mentioned here and update the PR description: https://github.com/grpc/grpc-go/blob/master/CONTRIBUTING.md#pr-descriptions Specifically the following:
|
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
I'm completely new to the otel codebase in grpc-go though. So, hopefully a second reviewer knows more :)
recorder.RecordInt64Count(h, incr, labels...) | ||
} | ||
|
||
// Int64UpDownCountHandle is a typed handle for an int up-down counter metric. |
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 understand this docstring is very similar to the existing one for Int64CountHandle
. But I'm curious as to what the "typed handle" means here.
} | ||
ret, err := meter.Int64UpDownCounter(string(metricName), options...) | ||
if err != nil { | ||
logger.Errorf("failed to register metric \"%v\", will not record: %v", metricName, err) |
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.
Nit: Log statements should follow capitalization rules for regular sentences, and not the ones that apply to error strings. See: go/go-style/decisions#error-strings
stats/otel: Part 1 for A94
Adds up down counter boiler plate code
RELEASE NOTES: none