Open micolous opened 4 years ago
A quick work-around, which makes LastValueAggregation
work:
from opencensus.stats import aggregation_data
aggregation_data.SumAggregationDataFloat = aggregation_data.SumAggregationData
This should be safe to also apply to current git master
of opencensus.ext.prometheus
(as SumAggregationDataFloat
is never referenced).
I think the source looks ok on master but it is not released to pypi. I think it just has to be released. Line 209 says SumAggregationData
I checked circle ci but saw no releases regarding this.
I added the __init__.py
to my own code-tree and it works:
from app.opencensus.ext.prometheus import new_stats_exporter
from app.opencensus.ext.prometheus import Options
...
new_stats_exporter(Options(address="", port=8081, namespace="rss-local"))
(added the init.py in app/opencensus.ext.prometheus).
So I am pretty sure the lacking uploads to pypi are the cause of this issue.
https://github.com/census-instrumentation/opencensus-python/commit/0d004585e945292df8fe042f7415c675fff2c14c renamed
opencensus.stats.aggregation_data.SumAggregationDataFloat
toSumAggregationData
in #696.The
opencensus-ext-prometheus
module was updated to support this in the same commit. However, there has been no release cut of opencensus-ext-prometheus since 2019-04-25, which appears to correspond to opencensus 0.5.0.As a result, metric export is broken for any View using
SumAggregation
orLastValueAggregation
, as when Prometheus collection runs, this if-elif chain results in:Package versions:
Also, the version numbering appears inconsistent, which makes things more confusing...