In this post, we’ll look at how you can use OpenTelemetry to monitor your unit tests and send that data to Honeycomb to visualize. It’s important to note that you don’t need to adopt Honeycomb, or even OpenTelemetry, in your production application to get the benefit of tracing. This example uses OpenTelemetry purely in the test project and provides great insights into our customer’s code. We’re going to use xUnit as the runner and framework for our tests.
OpenTelemetry is a free and open-source software initiative with the objective of supplying software developers with the means to create distributed systems. OpenTelemetry was developed by engineers at Google, and developers have the ability to utilize it to create a standard foundation for the construction of distributed systems. The goal is to enable developers to write code once and then deploy it in any location of their choosing.
OpenTracing was an open-source project developed to provide vendor-neutral APIs and instrumentation for distributed tracing across a variety of environments. As it is often extremely difficult for engineers to see the behaviour of requests when they are working across services in a distributed environment, OpenTracing aimed to provide a solution to heighten observability.
OpenTelemetry is a collection of tools and APIs for collecting, processing, and exporting telemetry data from software. It is used to instrument applications for performance monitoring, logging, tracking, tracing, and other observability purposes. What is Telemetry? The word is derived from the Greek “tele” meaning “remote,” and metron meaning “measure.” So, it’s the collection of metrics and their automatic to a receiver for monitoring.
The scenario: you want to see distributed traces, maybe for your web app. You’ve set up an OpenTelemetry collector to receive OTLP traces in JSON over HTTP, and send those to Honeycomb (how to do that is another post, and we’ll link it here when it’s up).
Systems and applications alike have become progressively distributed as microservices, open-source tools, and containerisation have gained traction. In order to actively monitor and respond quickly to issues that arise in our environment, distributed tracing has proven to be vital for businesses such as Uber, Postmates, Hello Fresh and TransferWise. It is, however, important to clarify what distributed tracing actually means.