Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/platforms/ruby/common/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,18 @@ config.trusted_proxies = ["2.2.2.2"]

</SdkOption>

<SdkOption name="hub_isolation_level" type="Symbol" defaultValue=":thread">

Controls where the SDK stores the current hub, which holds the active scope. The default `:thread` uses thread-local storage. Set it to `:fiber` to use [Fiber Storage](https://docs.ruby-lang.org/en/3.2/Fiber.html#class-Fiber-label-Fiber+Storage) (requires Ruby 3.2+), which prevents cross-request scope contamination on fiber-based servers such as [Falcon](https://github.com/socketry/falcon) and other `async` frameworks.

```ruby
config.hub_isolation_level = :fiber
```

Requesting `:fiber` on Ruby versions below 3.2 logs a warning and falls back to `:thread`.

</SdkOption>

## Tracing Options

<SdkOption name="traces_sample_rate" type="Float" defaultValue="nil">
Expand Down
Loading