Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Make Rack install optional for sinatra
This allows for scenarios when there are multiple Rack Applications mounted in the same builder and you want to avoid installing the Rack Events middleware multiple times in the stack. A common example is a Rails application that mounts a Sinatra App in the routes file: ```ruby Rails.application.routes.draw do mount Sinatra::Application, at: '/sinatra' end ``` This results in the Rack middleware being installed multiple times. Once by the Rails ActionPack instrumentation and then by the Sinatra application leading to multiple Rack spans being created in the same trace. This change allows you to avoid this by setting the install_rack option to false when using Sinatra instrumentation and allowing users to manually configure the middleware in the stack as they see fit.
- Loading branch information