You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @mkrill, thanks for your report. This certainly looks like a bug in the opencensus implementation.
With the UseDerivedCumulative flag it would provide the same metrics overall, but changes the type of some existing metrics from gauge to counter. As indicated in the discussion for the PR in opencensus this will fail for some collector backends.
We will consider this bug when switching from opencensus to opentelemetry, which is planned for the near future. See details in #179.
As you suggested previously, you can enable the UseDerivedCumulative flag in one of your own modules. For that, ensure that your module Depends() on the opencensus.Module, so that your module is initialized after the flamingo opencensus module. After that you can override the runmetrics with your own options like this:
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
flamingo/framework/opencensus/module.go
Lines 155 to 158 in fa5bd34
RunMetricOptions
are instantiated without settingUseDerivedCumulative
.Consequently, in line https://github.com/census-instrumentation/opencensus-go/blob/052120675fac2ace91dc2c01e5f63c3e6ec62f04/plugin/runmetrics/producer.go#L133 only
producer.deprecatedMemStats
is instantiated and notproducer.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.goThe text was updated successfully, but these errors were encountered: