Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported nested Rack EventHandlers #1101

Merged
merged 1 commit into from
Jun 20, 2024
Merged

Commits on Jun 19, 2024

  1. Supported nested Rack EventHandlers

    In the case that an app, for whatever reason, has nested Rack
    EventHandlers, handle this properly.
    
    This change makes it so that the EventHandler doesn't create multiple
    transactions if it's nested inside another EventHandler. It does this by
    assigning itself an ID (UUID), and adding it to the request environment.
    Then, on every callback it receives, it checks if it is the first
    EventHandler that handled the request. Only then does it do any
    instrumentation.
    
    This will help with accidental multiple registrations of the AppSignal
    Rack EventHandler in one app, like with nested apps. It also opens the
    door for automatically registering the EventHandler for other gems, like
    Sinatra.
    tombruijn committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    527754c View commit details
    Browse the repository at this point in the history