-
Notifications
You must be signed in to change notification settings - Fork 50
What's the difference between stats and metrics? #253
Comments
Yes, @mayurkale22 will add documentation on the difference between stats and metrics soon. Tracking in #244. |
Is there a chance you can give us the lowdown and reasoning behind this while proper documentation is sorted? We're evaluating OC vs direct Prometheus usage, and are finding it hard to follow the design decisions being made here. Thanks! |
In general, Stats APIs are the "OpenCensus" way of generating metrics. By using Stats APIs OpenCensus provides a way to record, aggregate and break down stats. After aggregation, Stats APIs produce Metrics. Metrics APIs are for exporting and consuming aggregated metrics. Stats API is one source of Metric. There can be other sources, like Gauge, Dropwizard metrics, etc. |
So if I read correctly, metrics are a way to circumvent the Stats/View division and generate metrics straight through, like Prometheus does? |
That's correct, it's similar to exporting aggregated metrics in Prometheus (https://prometheus.io/docs/instrumenting/writing_exporters/). With metrics API we're providing a way to export metrics to OpenCensus. |
This duality is very confusing. It seems like two parallel worlds in opencensus-go.
Isn't a "gauge" a measure with a view with last value aggregation?
Are you planning to unify "stats" and "metrics" somehow?
The text was updated successfully, but these errors were encountered: