How to instrument your Rails app with OpenTelemetry
summary
Configures the OpenTelemetry SDK and OTLP exporter to send traces, metrics, and logs to New Relic from a minimal Rails 8 app (Ruby 3.4.2), installs instrumentation with open-telemetry-instrumentation-all gem, and demonstrates adding a custom span (activity.duration) and attributes via ActiveSupport Notifications so traces show where uninstrumented time lives. Adds metrics with the experimental metrics SDK: a counter for activity completions and an HTTP server request duration histogram (custom bucket view, 3s export interval). Enables logs via a Ruby Logger bridge so logs include trace_id/span_id correlation.
AI-written summary · about
chapters (15)
- 0:00OpenTelemetry and Rails intro
- 1:06Observability and OpenTelemetry
- 10:58Core signals and data types
- 14:07Workshop environment setup
- 18:21SDK and exporters config
- 27:10Instrumenting a Rails app
- 37:31Custom spans and telemetry
- 41:07Viewing traces in backend
- 55:20Break and troubleshooting
- 58:11Introducing OpenTelemetry metrics
- 1:03:12Recording custom metrics
- 1:13:08Configuring and viewing logs
- 1:20:16Custom metrics instrumentation
- 1:31:10Workshop recap and future
- 1:36:31Q&A
related talks
21mUsing OpenTelemetry to Build More Human-Friendly Systems
24mOn making your Rails App more transparent
24mObservability and instrumentation via OpenTelemetry
01h 00mPractical OpenTelemetry for .NET
23mModern Application Debugging: An Intro to OpenTelemetry
02h 02mHow To Troubleshoot and Monitor Applications using OpenTelemetry
39mMonitoring Elixir With OpenTelemetry
28mMonitoring Rails apps using Open Source
