This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
Memory statistics never collected unless UseDerivedCumulative is used #1295
Open
Description
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
go.opencensus.io v0.23.0
What version of Go are you using?
1.18
What did you do?
Callled
runmetrics.Enable(runmetrics.RunMetricOptions{
EnableCPU: true,
EnableMemory: true,
})
What did you expect to see?
That memory metrics were being updated
What did you see instead?
Memory metrics are NOT updated.
Additional context
I think the bug was created with the commit: 49838f2
Metrics are created here:
opencensus-go/plugin/runmetrics/producer.go
Lines 125 to 138 in 06ffb6a
The problem is that p.deprecatedMemStats.read()
is never called in func (p *producer) Read()
:
opencensus-go/plugin/runmetrics/producer.go
Lines 167 to 177 in 06ffb6a