Module: PostHog::Rails::ActiveJobExtensions

Includes:
ParameterFilter
Defined in:
lib/posthog/rails/active_job.rb

Overview

ActiveJob integration to capture exceptions from background jobs

Defined Under Namespace

Modules: ClassMethods

Constant Summary

Constants included from ParameterFilter

ParameterFilter::EMPTY_HASH, ParameterFilter::MAX_DEPTH, ParameterFilter::MAX_STRING_LENGTH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ParameterFilter

backend, #filter_sensitive_params, #safe_serialize

Class Method Details

.prepended(base) ⇒ Object



11
12
13
# File 'lib/posthog/rails/active_job.rb', line 11

def self.prepended(base)
  base.extend(ClassMethods)
end

Instance Method Details

#perform_nowObject



33
34
35
36
37
38
39
# File 'lib/posthog/rails/active_job.rb', line 33

def perform_now
  super
rescue StandardError => e
  # Capture the exception with job context
  capture_job_exception(e)
  raise
end