-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
stats: Various CSM Observability bug fixes #7278
Conversation
@@ -44,12 +44,15 @@ func (h *clientStatsHandler) initializeMetrics() { | |||
return | |||
} | |||
|
|||
meter := h.o.MetricsOptions.MeterProvider.Meter("grpc-go " + grpc.Version) | |||
meter := h.o.MetricsOptions.MeterProvider.Meter("grpc-go ", otelmetric.WithInstrumentationVersion(grpc.Version)) |
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.
Delete this space in the string and the one below please.
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.
Done.
setOfMetrics := DefaultMetrics.metrics | ||
if h.o.MetricsOptions.Metrics != nil { | ||
setOfMetrics = h.o.MetricsOptions.Metrics.metrics | ||
} |
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.
Go style prefers:
setOfMetrics := h.o.MetricsOptions.Metrics
if setOfMetrics == nil {
setOfMetrics = DefaultMetrics.metrics
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.
Done. Note that this conditional is on the .Metrics field so switched to metrics.metrics in the create calls.
This PR fixes various bugs I found while interop testing CSM Observability.
RELEASE NOTES: N/A