Open Telemetry - In a nutshell

I started looking into a project recently that required monitoring and observability, and I came across Open Telemetry. I had heard of it before but never really understood what it was or how it worked. So, I decided to do some research and share my findings.

What is Open Telemetry?

Open Telemetry is an open-source project that provides a set of tools, APIs, and SDKs for collecting and exporting data from applications.

For my project, it would allow me to log and trace requests. It would log the following information (for example):

  • A trace/span — "button clicked → API call started → server processed → DB queried → response returned"
  • Timestamps — start time, end time, duration of each step
  • Attributes — button name, user ID, HTTP status, error messages, etc.
  • Metrics — how many times clicked, how long it took

Now the data that is captured doesn't tend to sit in a standard DB. Instead, it is sent to a backend that is designed to handle this type of data, such as Datadog, Grafana, etc. These services allow you to visualize and analyze the data to gain insights into the performance and behavior of your application.

Conclusion

Open Telemetry is a powerful tool for monitoring and observability that can help developers gain insights into the performance and behavior of their applications. Rather than basic logging, it allows you to capture detailed information about requests, including traces, attributes, and metrics.