An Intro to OpenCensus

In my last few posts, I have been talking about distributed tracing and some of the open source options. In this post, I would like to take a look at the OpenCensus project. Read on to learn more!

What is OpenCensus?

OpenCensus is a vendor-agnostic, implementation for the collection of metrics and distributed traces. It provides:

  • Client libraries (C#, C++, Erlang/Elixir, Go, Java, Node, PHP, Python, Ruby and Scala)
  • Collection service (agent + collector)
  • Support for a variety of receivers and exporters

It was released in 2018 and is backed by Google and Microsoft. It has a variety of partners and contributors.

Client Libraries

Client libraries are provided for all the major languages. The goal is for them all to fully support both metrics and traces.

To see the status of support for the above client libraries, see the feature matrix.

The OpenCensus Service

OpenCensus also provides the OpenCensus Service which is made up of:

  • OpenCensus Agent
    • Can be run as a binary, sidecar, or daemonset
    • Receives data from the application and can forward to one or more destinations
    • Does not block or cause back pressure to application
  • OpenCensus Collector
    • Run as a separate application
    • Receives data from applications or the OpenCensus Agent and can forward to one or more destinations
    • Does not block or cause back pressure to application
    • Offers advanced functionality including queuing, retry, and intelligent sampling

Both of these components are made up of:

  • Receivers: How you get data in
  • Exporters: How you get data out

It should be noted that even if you are not using OpenCensus today, you should consider using the OpenCensus Service to receive and forward data (i.e. replacing what you currently use). The reason for this is because the OpenCensus Service supports all common formats today:

Summary

With support for all major libraries and all major open source metric and tracing backends, OpenCensus makes it easy to extract observability data from your application. If you are interested in learning more or getting involved, check out the Community section.

© 2019 – 2021, Steve Flanders. All rights reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top