From 1d4d274b0777793a8d39f76ded6a6b292f97abb0 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Fri, 9 Oct 2015 09:10:51 -0500 Subject: Include request id in statistics to make it to search the logs --- lib/action_cable/connection/base.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/action_cable/connection/base.rb') diff --git a/lib/action_cable/connection/base.rb b/lib/action_cable/connection/base.rb index de1369f009..cd7f76f118 100644 --- a/lib/action_cable/connection/base.rb +++ b/lib/action_cable/connection/base.rb @@ -111,7 +111,12 @@ module ActionCable # Return a basic hash of statistics for the connection keyed with `identifier`, `started_at`, and `subscriptions`. # This can be returned by a health check against the connection. def statistics - { identifier: connection_identifier, started_at: @started_at, subscriptions: subscriptions.identifiers } + { + identifier: connection_identifier, + started_at: @started_at, + subscriptions: subscriptions.identifiers, + request_id: @env['action_dispatch.request_id'] + } end def beat -- cgit v1.2.3