Sha256: 4e08257607c4e9c64b9367f7230eec077d037060e1b632b44da373b25742ff41

Contents?: true

Size: 416 Bytes

Versions: 50

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

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)
        REQUEST_ID_HEADERS.each do |key|
          request_id = env[key]
          return request_id if request_id
        end
        nil
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
sentry-ruby-core-5.16.1 lib/sentry/utils/request_id.rb
sentry-ruby-5.16.1 lib/sentry/utils/request_id.rb
sentry-ruby-5.16.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.16.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.15.2 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.15.2 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.15.1 lib/sentry/utils/request_id.rb
sentry-ruby-5.15.1 lib/sentry/utils/request_id.rb
sentry-ruby-5.15.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.15.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.14.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.14.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.13.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.13.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.12.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.12.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.11.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.11.0 lib/sentry/utils/request_id.rb
sentry-ruby-5.10.0 lib/sentry/utils/request_id.rb
sentry-ruby-core-5.10.0 lib/sentry/utils/request_id.rb