Module: Instana::Instrumentation::ActionMailer

Defined in:
lib/instana/instrumentation/action_mailer.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object

rubocop:disable Style/MissingRespondToMissing



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/instana/instrumentation/action_mailer.rb', line 7

def method_missing(method_name, *args) # rubocop:disable Style/MissingRespondToMissing
  if action_methods.include?(method_name.to_s)
    tags = {
      actionmailer: {
        class: to_s,
        method: method_name.to_s
      }
    }
    Instana.tracer.in_span(:'mail.actionmailer', attributes: tags) { super }
  else
    super
  end
end