-
John Hawthorn authored
Previously ActionDispatch::ServerTiming would subscribe and unsubscribe on each request. This could cause issues with the internal stacks of ActiveSupport::Notifications, particlularly under the previous AS::N implementation which used thread-local stacks for every subscriber (the new implementation has mostly mitigated this). Additionally, the previous ServerTiming implementation did not report metrics correctly in a multi-threaded environment. This commit works around both of these issues by using a single global subscription, which collects events into a per-thread Array.
John Hawthorn authoredPreviously ActionDispatch::ServerTiming would subscribe and unsubscribe on each request. This could cause issues with the internal stacks of ActiveSupport::Notifications, particlularly under the previous AS::N implementation which used thread-local stacks for every subscriber (the new implementation has mostly mitigated this). Additionally, the previous ServerTiming implementation did not report metrics correctly in a multi-threaded environment. This commit works around both of these issues by using a single global subscription, which collects events into a per-thread Array.
Loading