If you don’t know, ask – if you know, share! ~ opensource mindset
by Marco Bravo
While Prometheus has become the de facto standard for monitoring Kubernetes for many users, there may be reasons why you might choose another approach for metric telemetry.
One reason is that using Prometheus introduces another component in your cluster that needs to be maintained and updated and will require additional management to ensure data persistence over the long term. Another reason is that Prometheus collects an incredibly large set of metrics right out of the box, and this could become cost-prohibitive in situations where metric volume is an input into your overall observability costs.
OpenCensus is a set of open source libraries for observability instrumentation. OpenCensus is the currently recommended library to use for instrumenting services to collect traces and metrics. The OpenTracing and OpenCensus projects have been merged into OpenTelemetry, which will become the recommended library.
Unlike Prometheus, where you have to define the metric kind upfront, OpenCensus simply requires you to collect the measurements and then aggregate them in the view before sending them to the exporter. The measurements support integer and float values. From there, you can use create histograms using the distribution aggregation, add up the number of samples using the count aggregation, or add up the collected values using the sum aggregation.
tags: devops - opencensus - monitor - kubernetes - k8s - cluster