Open kfcss opened 1 year ago
Please answer these questions before submitting a bug report.
go.opencensus.io v0.23.0
1.18
Callled
runmetrics.Enable(runmetrics.RunMetricOptions{ EnableCPU: true, EnableMemory: true, })
That memory metrics were being updated
Memory metrics are NOT updated.
I think the bug was created with the commit: https://github.com/census-instrumentation/opencensus-go/commit/49838f207d61097fc0ebb8aeef306913388376ca
Metrics are created here: https://github.com/census-instrumentation/opencensus-go/blob/06ffb6a91ef660d6a1a085dd8489758232c19bca/plugin/runmetrics/producer.go#L125-L138
The problem is that p.deprecatedMemStats.read() is never called in func (p *producer) Read(): https://github.com/census-instrumentation/opencensus-go/blob/06ffb6a91ef660d6a1a085dd8489758232c19bca/plugin/runmetrics/producer.go#L167-L177
p.deprecatedMemStats.read()
func (p *producer) Read()
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
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: https://github.com/census-instrumentation/opencensus-go/commit/49838f207d61097fc0ebb8aeef306913388376ca
Metrics are created here: https://github.com/census-instrumentation/opencensus-go/blob/06ffb6a91ef660d6a1a085dd8489758232c19bca/plugin/runmetrics/producer.go#L125-L138
The problem is that
p.deprecatedMemStats.read()
is never called infunc (p *producer) Read()
: https://github.com/census-instrumentation/opencensus-go/blob/06ffb6a91ef660d6a1a085dd8489758232c19bca/plugin/runmetrics/producer.go#L167-L177