grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

stats: Add metrics registry

Open zasweq opened this issue 1 year ago • 3 comments

This PR adds the instrument registry for Non Per Call Metrics. It also moves Metrics symbol to external, and defined a MetricRecorder type for non per call metrics.

The next PR will be the OpenTelemetry component usage of this global registry and implementation of MetricRecorder, including the merging of default metrics by shifting default metrics to a function as per Yashes suggestion.

RELEASE NOTES: N/A

zasweq avatar Jun 25 '24 00:06 zasweq

Codecov Report

Attention: Patch coverage is 67.03297% with 30 lines in your changes missing coverage. Please review.

Project coverage is 81.54%. Comparing base (4dd7f55) to head (1ec4e54). Report is 36 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7349      +/-   ##
==========================================
+ Coverage   80.58%   81.54%   +0.95%     
==========================================
  Files         349      350       +1     
  Lines       34056    26843    -7213     
==========================================
- Hits        27445    21889    -5556     
+ Misses       5431     3770    -1661     
- Partials     1180     1184       +4     
Files Coverage Δ
experimental/stats/metricregistry.go 93.44% <93.44%> (ø)
experimental/stats/metrics.go 13.33% <13.33%> (ø)

... and 302 files with indirect coverage changes

codecov[bot] avatar Jun 25 '24 00:06 codecov[bot]

Got to offline discussion items, and moved symbols around to where we discussed.

zasweq avatar Jun 26 '24 00:06 zasweq

Thanks for your help; got to all comments and fixed tests.

zasweq avatar Jul 11 '24 22:07 zasweq

This should be good to go modulo the small nits/test issue. Let's be ready to iterate on the registry stuff if you find it isn't working well while implementing the things that use it.

dfawley avatar Jul 12 '24 16:07 dfawley