An issue where in a threaded environment the dynamic subscriptions from ActionDispatch::ServerTiming would cause a mismatch in the number of subscriptions to a topic, which would pop too many values off of the thread-local stacks, leading to invalid events being sent to subscribers which leads to nil value for time in Event object which throws an exception.
Description of changes
Use finish_with_state inside RailsSemanticLogger::Rack::Logger. This ensures that the finished instrumenter is sent to the same subscribers that the initial request was sent to.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue # (if available)
An issue where in a threaded environment the dynamic subscriptions from ActionDispatch::ServerTiming would cause a mismatch in the number of subscriptions to a topic, which would pop too many values off of the thread-local stacks, leading to invalid events being sent to subscribers which leads to nil value for
time
in Event object which throws an exception.Description of changes
Use finish_with_state inside RailsSemanticLogger::Rack::Logger. This ensures that the finished instrumenter is sent to the same subscribers that the initial request was sent to.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.