Module: Sentry::Rails::ErrorReporterContext

Included in:
ActiveJobExtensions::SentryReporter, CaptureExceptions
Defined in:
lib/sentry/rails/error_reporter_context.rb

Constant Summary collapse

SUPPORTS_EXECUTION_CONTEXT =
Gem::Version.new(::Rails.version) >= Gem::Version.new("7.0.0")

Instance Method Summary collapse

Instance Method Details

#execution_contextObject



11
12
13
14
15
16
17
18
# File 'lib/sentry/rails/error_reporter_context.rb', line 11

def execution_context
  return {} unless Sentry.configuration.send_default_pii

  context = ::ActiveSupport::ExecutionContext.to_h
  return {} if context.empty?

  { "rails.error" => Sentry::Rails::Serializer.serialize(context) }
end