ObserveNow
...
Integrations
Applications

Ruby

Ruby Tracing Instrumentation

Ruby >= v2.5

OpenTelemetry is the recommended approach to instrument for tracing. Please follow the instructions below to achieve auto-instrumentation:

In the example above

Gemfile

Ruby


config/initializers/opentelemetry.rb

Ruby


Ruby < v2.5

OpenTelemetry libraries do not support Ruby version less than 2.5. To get auto-instrumentation in this situation, we recommend using OpenCensus (which was later merged into OpenTelemetry) with the Jaeger exporter until you are able to upgrade.

Here is a sample Rails app auto instrumented:

Gemfile

Ruby


config/application.rb file

Ruby