Class: Aws::Xray::ErrorHandlerWithSentry

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/xray/error_handlers.rb

Overview

Must be configured sentry-raven gem.

Constant Summary collapse

ERROR_LEVEL =
'warning'.freeze

Instance Method Summary collapse

Instance Method Details

#call(error, payload, host:, port:) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/aws/xray/error_handlers.rb', line 28

def call(error, payload, host:, port:)
  ::Raven.capture_exception(
    error,
    level: ERROR_LEVEL,
    extra: { 'payload' => payload, 'payload_raw' => payload.unpack('H*').first }
  )
end