Module: Datadog::Tracing::Contrib::ActionMailer::Events::Process
- Defined in:
- lib/datadog/tracing/contrib/action_mailer/events/process.rb
Overview
Defines instrumentation for process.action_mailer event
Constant Summary collapse
- EVENT_NAME =
'process.action_mailer'
Class Method Summary collapse
- .event_name ⇒ Object
- .on_start(span, event, _id, payload) ⇒ Object
- .span_name ⇒ Object
- .span_type ⇒ Object
Methods included from Datadog::Tracing::Contrib::ActionMailer::Event
Class Method Details
.event_name ⇒ Object
20 21 22 |
# File 'lib/datadog/tracing/contrib/action_mailer/events/process.rb', line 20 def event_name self::EVENT_NAME end |
.on_start(span, event, _id, payload) ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/datadog/tracing/contrib/action_mailer/events/process.rb', line 33 def on_start(span, event, _id, payload) super span.resource = payload[:mailer] # Mailer is not available at `on_start` span.set_tag(Ext::TAG_ACTION, payload[:action]) span.set_tag(Ext::TAG_MAILER, payload[:mailer]) span.set_tag(Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_PROCESS) end |
.span_name ⇒ Object
24 25 26 |
# File 'lib/datadog/tracing/contrib/action_mailer/events/process.rb', line 24 def span_name Ext::SPAN_PROCESS end |
.span_type ⇒ Object
28 29 30 31 |
# File 'lib/datadog/tracing/contrib/action_mailer/events/process.rb', line 28 def span_type # process.action_mailer processes email and renders partial templates Tracing::Metadata::Ext::HTTP::TYPE_TEMPLATE end |