fix(rails): Track request queue time in Rails middleware by dingsdax · Pull Request #2877 · getsentry/sentry-ruby

@dingsdax @claude

The Rails CaptureExceptions middleware subclass overrode start_transaction
without calling super, so the http.server.request.time_in_queue attachment
added in #2838 was silently skipped for all Rails apps.

Extract queue time attachment into a private attach_queue_time method on
the Rack base class so the Rails subclass can invoke it explicitly while
keeping its own options hash (preserving the correct SPAN_ORIGIN constant
"auto.http.rails" via lexical scoping).

Fixes #2873
Co-Authored-By: Claude <noreply@anthropic.com>

sl0thentr0py

This was referenced

Mar 2, 2026

@dingsdax dingsdax deleted the fix/rails-queue-time-2873 branch

March 2, 2026 09:22