Class: OpenTelemetry::Instrumentation::ActionMailer::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/opentelemetry/instrumentation/action_mailer/railtie.rb

Overview

This Railtie sets up subscriptions to relevant ActionMailer notifications

Class Method Summary collapse

Class Method Details

.configObject



40
41
42
# File 'lib/opentelemetry/instrumentation/action_mailer/railtie.rb', line 40

def config
  ActionMailer::Instrumentation.instance.config
end

.subscribe_to_deliverObject



22
23
24
25
26
27
28
29
# File 'lib/opentelemetry/instrumentation/action_mailer/railtie.rb', line 22

def subscribe_to_deliver
  ::OpenTelemetry::Instrumentation::ActiveSupport.subscribe(
    ActionMailer::Instrumentation.instance.tracer,
    DELIVER_SUBSCRIPTION,
    config[:notification_payload_transform],
    config[:disallowed_notification_payload_keys]
  )
end

.subscribe_to_processObject



31
32
33
34
35
36
37
38
# File 'lib/opentelemetry/instrumentation/action_mailer/railtie.rb', line 31

def subscribe_to_process
  ::OpenTelemetry::Instrumentation::ActiveSupport.subscribe(
    ActionMailer::Instrumentation.instance.tracer,
    PROCESS_SUBSCRIPTION,
    config[:process_payload_transform],
    config[:disallowed_process_payload_keys]
  )
end