File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -79,19 +79,16 @@ func ExampleMeter_asynchronous_multiple() {
7979 // This is just a sample of memory stats to record from the Memstats
8080 heapAlloc , _ := meter .Int64ObservableUpDownCounter ("heapAllocs" )
8181 gcCount , _ := meter .Int64ObservableCounter ("gcCount" )
82- gcPause , _ := meter .Float64Histogram ("gcPause" )
8382
8483 _ , err := meter .RegisterCallback (
85- func (ctx context.Context , o metric.Observer ) error {
84+ func (_ context.Context , o metric.Observer ) error {
8685 memStats := & runtime.MemStats {}
8786 // This call does work
8887 runtime .ReadMemStats (memStats )
8988
9089 o .ObserveInt64 (heapAlloc , int64 (memStats .HeapAlloc ))
9190 o .ObserveInt64 (gcCount , int64 (memStats .NumGC ))
9291
93- // This function synchronously records the pauses
94- computeGCPauses (ctx , gcPause , memStats .PauseNs [:])
9592 return nil
9693 },
9794 heapAlloc ,
@@ -102,6 +99,3 @@ func ExampleMeter_asynchronous_multiple() {
10299 panic (err )
103100 }
104101}
105-
106- // This is just an example, see the the contrib runtime instrumentation for real implementation.
107- func computeGCPauses (ctx context.Context , recorder instrument.Float64Histogram , pauseBuff []uint64 ) {}
You can’t perform that action at this time.
0 commit comments