Rails Project Ditches Vendor Lock-in
Company exports logs directly to Grafana Cloud using OpenTelemetry Ruby SDK, simplifying infrastructure and ensuring flexibility

A company has successfully configured OpenTelemetry logs in a Rails project, adding observability without being locked into a single vendor. The company used the OpenTelemetry Ruby SDK to export logs directly to Grafana Cloud.
The OpenTelemetry Protocol (OTLP) is a standard, vendor-agnostic format for telemetry data, which includes logs, metrics, and traces. This format allows for flexibility in switching backends, such as Datadog, New Relic, or Grafana Cloud, without rewriting application code.
The company bypassed the standard OpenTelemetry deployment, which involves running an OpenTelemetry Collector alongside the application, and instead exported logs directly from the Ruby SDK to Grafana Cloud. This approach was chosen to keep the infrastructure simple, and the SDK's built-in batching was sufficient for the company's small log volume.
To set up the Ruby SDK for logs, the company added several gems to their Gemfile, including opentelemetry-sdk, opentelemetry-logs-sdk, opentelemetry-exporter-otlp, opentelemetry-exporter-otlp-logs, and opentelemetry-instrumentation-all. The opentelemetry-sdk gem handles the core OpenTelemetry framework, while the opentelemetry-logs-sdk gem adds support for the logging signal.
## Why it matters The ability to add observability to a Rails project without being locked into a single vendor is crucial for companies that want to maintain flexibility in their technology stack. OpenTelemetry provides a standard, vendor-agnostic format for telemetry data, making it an attractive choice for companies that want to avoid vendor lock-in. The success of this company's implementation demonstrates the feasibility of using OpenTelemetry in a Rails project, and highlights the benefits of using a standard format for telemetry data.
The company's decision to export logs directly to Grafana Cloud using the OpenTelemetry Ruby SDK also highlights the importance of simplicity in infrastructure. By bypassing the OpenTelemetry Collector, the company was able to keep their infrastructure simple, while still achieving their goal of adding observability to their Rails project.
## What happens next As more companies adopt OpenTelemetry, we can expect to see increased innovation and development in the field of observability. The use of standard, vendor-agnostic formats for telemetry data will become more widespread, making it easier for companies to switch between different backends and avoid vendor lock-in. The success of this company's implementation is a promising sign for the future of observability in Rails projects, and demonstrates the potential of OpenTelemetry to simplify and improve the way we monitor and analyze our applications.





