Skip to content

Commit 5e861d2

Browse files
authored
Update for Ruby otel-rack post v0.24.0 (#11617)
The Ruby otel gem uses Rack Events rather than a middleware since v0.24.0, so the instructions for ordering middlewares no longer work.
1 parent 948481a commit 5e861d2

File tree

1 file changed

+1
-2
lines changed
  • platform-includes/performance/opentelemetry-setup

1 file changed

+1
-2
lines changed

platform-includes/performance/opentelemetry-setup/ruby.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ end
2323
OpenTelemetry.propagation = Sentry::OpenTelemetry::Propagator.new
2424
```
2525

26-
Note that if you need extra Sentry features such as tags / user, you will need to re-order the middleware as below to
27-
make sure Sentry's scope management works properly.
26+
Note that if you are using the Ruby OpenTelemetry gem [*pre-v0.24.0*](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rack#rack-middleware-vs-rack-events) along with extra Sentry features such as tags / user, you will need to re-order the middleware as below to make sure Sentry's scope management works properly. (After v0.24.0, the gem [uses Rack Events rather than a middleware.](https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/rack#rack-middleware-vs-rack-events))
2827

2928
```ruby {filename:config/initializers/otel.rb}
3029
Rails.application.config.middleware.move_after(

0 commit comments

Comments
 (0)