Class: ActionReporter::RailsReporter

Inherits:
Base
  • Object
show all
Defined in:
lib/action_reporter/rails_reporter.rb

Instance Method Summary collapse

Methods inherited from Base

class_accessor, #merge_context_updates, #reset_context, #resolve_check_in_id, #resolve_user_id, #transaction_id=, #transaction_name=, #transform_context

Instance Method Details

#check_in(identifier) ⇒ Object



17
18
19
20
# File 'lib/action_reporter/rails_reporter.rb', line 17

def check_in(identifier)
  check_in_id = resolve_check_in_id(identifier)
  rails_class.logger.info("Reporter check-in: #{check_in_id}")
end

#context(args) ⇒ Object



12
13
14
15
# File 'lib/action_reporter/rails_reporter.rb', line 12

def context(args)
  new_context = transform_context(args)
  rails_class.logger.info("Reporter context: #{new_context.inspect}")
end

#notify(error, context: {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/action_reporter/rails_reporter.rb', line 5

def notify(error, context: {})
  new_context = transform_context(context)
  rails_class.logger.info(
    "Reporter notification: #{error.inspect}, #{new_context.inspect}"
  )
end