Skip to content

Commit

Permalink
feat!: Use Rack Events By Default
Browse files Browse the repository at this point in the history
  • Loading branch information
arielvalentin committed Jan 5, 2024
1 parent 3b33f19 commit f7f4603
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions instrumentation/rack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ OpenTelemetry::SDK.configure do |c|
c.use_all
end
```

## Rack Middleware vs Rack Events

Since `v0.24.0`, this instrumentation uses `Rake::Events` as opposed to `Middleware` to support Requests that use Buffered Response Bodies.

If your application does not support `Rack::Events`, you may disable it by setting `use_rack_events: false`, e.g.

```ruby
OpenTelemetry::SDK.configure do |c|
c.use 'OpenTelemetry::Instrumentation::Rack', use_rack_events: false
end
```

This will switch to using `Rack::Middleware` by default in dependent instrumentations.

See [#342](https://github.com/open-telemetry/opentelemetry-ruby-contrib/pull/342) for more details.

## Controlling span name cardinality

By default we will set the rack span name to match the format "HTTP #{method}" (ie. HTTP GET). There are different ways to control span names with this instrumentation.
Expand Down

0 comments on commit f7f4603

Please sign in to comment.