diff --git a/docs/platforms/ruby/common/configuration/options.mdx b/docs/platforms/ruby/common/configuration/options.mdx index f6df1f277ddfd3..7eb6ef17a4a0f2 100644 --- a/docs/platforms/ruby/common/configuration/options.mdx +++ b/docs/platforms/ruby/common/configuration/options.mdx @@ -263,6 +263,18 @@ config.trusted_proxies = ["2.2.2.2"] + + +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`. + + + ## Tracing Options