Sha256: bc94dbe5fd89a8edc88c7ffce5d7010b6a114c2257a761b1db29d4e40dcc8ae6

Contents?: true

Size: 395 Bytes

Versions: 6

Compression:

Stored size: 395 Bytes

Contents

module Sentry
  module Utils
    module RequestId
      REQUEST_ID_HEADERS = %w(action_dispatch.request_id HTTP_X_REQUEST_ID).freeze

      # Request ID based on ActionDispatch::RequestId
      def self.read_from(env_hash)
        REQUEST_ID_HEADERS.each do |key|
          request_id = env_hash[key]
          return request_id if request_id
        end
        nil
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sentry-ruby-4.1.2 lib/sentry/utils/request_id.rb
sentry-ruby-4.1.1 lib/sentry/utils/request_id.rb
sentry-ruby-4.1.0 lib/sentry/utils/request_id.rb
sentry-ruby-4.0.1 lib/sentry/utils/request_id.rb
sentry-ruby-4.0.0 lib/sentry/utils/request_id.rb
sentry-ruby-0.3.0 lib/sentry/utils/request_id.rb