OpenTelemetry for Ruby
OpenTelemetry offers full support for Ruby, making it easy to add observability to your Rails apps, Sinatra services, and background jobs.Installation
Install the OpenTelemetry Ruby gems:Gemfile
:
👉 OpenTelemetry Ruby Getting Started
Auto-Instrumentation
Auto-instrumentation lets you automatically trace common libraries such as HTTP clients, database drivers, and more without needing to modify your code. OpenTelemetry provides auto-instrumentation libraries for many popular languages, making it fast to get started with tracing. In Ruby, you can automatically instrument popular frameworks like Rails, Rack, and ActiveRecord:👉 Ruby Auto-Instrumentation Setup
Manual Instrumentation
Manual instrumentation gives you full control over your traces, allowing you to create spans wherever needed. You can customize span names, attributes, and relationships to capture the most important parts of your application’s flow. You can manually create spans in your Ruby code:👉 Ruby Manual Instrumentation Guide