Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Exported type/kind conversion for different aggregates #148

Open
fabxc opened this issue Jul 20, 2018 · 3 comments
Open

Exported type/kind conversion for different aggregates #148

fabxc opened this issue Jul 20, 2018 · 3 comments

Comments

@fabxc
Copy link
Contributor

fabxc commented Jul 20, 2018

I first ran into this via the Prometheus exporter in Go but I think it affects more libraries after browsing through different exporters and languages.

I have a sum aggregation, which is strictly increasing. I cannot use a count aggregation because it's in a tight loop and would eat lots of CPU.

I understand that a negative observation can make the sum go up and down. So making it a gauge type would make sense. But the Prometheus exporter converts the sum aggregation to Prometheus's "untyped" type in Go and Java alike instead.

  • What is the reasoning behind this?
  • Could a new MonotonicSum aggregation, that can cleanly map to a cumulative/counter type, be a useful addition to support this use case? (worth a separate issue?)

Digging further, the Stackdriver exporter in Java seems to return an unrecognized kind as well. The Go Stackdriver exporter though creates all metrics as cumulatives regardless of their aggregation, which seems incorrect.

@jkohen

@jkohen
Copy link

jkohen commented Jul 20, 2018

@bogdandrutu serendipity! Exactly what we were discussing about treating counters explicitly as monotonic event counters.

@fabxc
Copy link
Contributor Author

fabxc commented Jul 23, 2018

It seems that the census-ecosystem Stackdriver exporter for Go fixes one issue described above.
What is the relationship between the exporters in this Github org and the implementations directly in the client libraries?

@basvanbeek
Copy link
Member

The implementation directly in the go client library will be deprecated in the future, see: census-instrumentation/opencensus-go#790

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants