How we configured OpenTelemetry logs in Rails

This article explains how to configure OpenTelemetry logs in a Ruby on Rails application to achieve vendor-agnostic observability. It details the use of specific gems and the decision to bypass the OpenTelemetry Collector for simpler infrastructure.
Why it matters
It provides a practical guide for developers looking to implement standardized monitoring without vendor lock-in, which is a growing concern in cloud-native software architecture.
Recently, we needed to add observability to a Rails project without getting locked into a single vendor. OpenTelemetry was the natural choice.
It generates three kinds of telemetry data, called signals : logs, metrics, and traces. Each signal is independent, so you can adopt one without the others.
All of these signals travel in a standard, vendor-agnostic format known as OTLP (OpenTelemetry Protocol). Because this format is standard across the industry, we can switch backends (like Datadog, New Relic, or Grafana Cloud) in the future without rewriting any application code.
In this post, we will explain how we configured the OpenTelemetry Ruby SDK to export logs directly to our vendor, Grafana Cloud. We will also discuss a few issues we encountered along the way and the upstream fixes we contributed.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in