opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Implement go.schedule.duration

Open dashpole opened this issue 1 year ago • 1 comments

Fixes https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5974.

This uses the same method for estimating the sum as the prometheus client-go: https://github.com/prometheus/client_golang/blob/46f77a97fa1e83e7285634745bd5c92c11bf20c7/prometheus/go_collector_latest.go#L543, which is to use the lower-bound of each bucket as the value of each observation.

It implements this using a metric producer. It is designed to be used together with existing runtime instrumentation.

dashpole avatar Aug 07 '24 02:08 dashpole

Codecov Report

Attention: Patch coverage is 86.66667% with 12 lines in your changes missing coverage. Please review.

Project coverage is 65.7%. Comparing base (6ffea7b) to head (2950bc4).

Files with missing lines Patch % Lines
instrumentation/runtime/producer.go 86.2% 4 Missing and 4 partials :warning:
instrumentation/runtime/options.go 72.7% 2 Missing and 1 partial :warning:
instrumentation/runtime/runtime.go 95.2% 1 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #5991     +/-   ##
=======================================
+ Coverage   65.5%   65.7%   +0.2%     
=======================================
  Files        203     203             
  Lines      12985   13034     +49     
=======================================
+ Hits        8506    8569     +63     
+ Misses      4219    4204     -15     
- Partials     260     261      +1     
Files with missing lines Coverage Δ
instrumentation/runtime/runtime.go 80.9% <95.2%> (+2.4%) :arrow_up:
instrumentation/runtime/options.go 88.4% <72.7%> (-11.6%) :arrow_down:
instrumentation/runtime/producer.go 86.2% <86.2%> (ø)

... and 1 file with indirect coverage changes

codecov[bot] avatar Aug 07 '24 14:08 codecov[bot]