Skip to content

Memory stats are not updated #228

Open
@mkrill

Description

Hello Flamingo team,

due to an issue in https://github.com/census-instrumentation/opencensus-go, the memory stats do not seem to be updated for opencensus.
In line

if err := runmetrics.Enable(runmetrics.RunMetricOptions{
EnableCPU: true,
EnableMemory: true,
}); err != nil {
the RunMetricOptions are instantiated without setting UseDerivedCumulative.
Consequently, in line https://github.com/census-instrumentation/opencensus-go/blob/052120675fac2ace91dc2c01e5f63c3e6ec62f04/plugin/runmetrics/producer.go#L133 only producer.deprecatedMemStats is instantiated and not producer.memStats.
But, the latter seems to be required to read current memory metrics => see https://github.com/census-instrumentation/opencensus-go/blob/052120675fac2ace91dc2c01e5f63c3e6ec62f04/plugin/runmetrics/producer.go#L169
A possible workaround might be, to set UseDerivedCumulative in framework/opencensus/module.go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions