Module: Datadog::Contrib::ActionView::Events::RenderPartial
- Includes:
- Datadog::Contrib::ActionView::Event
- Defined in:
- lib/ddtrace/contrib/action_view/events/render_partial.rb
Overview
Defines instrumentation for render_partial.action_view event
Constant Summary collapse
- EVENT_NAME =
'render_partial.action_view'.freeze
Class Method Summary collapse
Methods included from Datadog::Contrib::ActionView::Event
Class Method Details
.event_name ⇒ Object
19 20 21 |
# File 'lib/ddtrace/contrib/action_view/events/render_partial.rb', line 19 def event_name self::EVENT_NAME end |
.process(span, _event, _id, payload) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ddtrace/contrib/action_view/events/render_partial.rb', line 27 def process(span, _event, _id, payload) span.service = configuration[:service_name] span.span_type = Datadog::Ext::HTTP::TEMPLATE if (template_name = Utils.normalize_template_name(payload[:identifier])) span.resource = template_name span.set_tag(Ext::TAG_TEMPLATE_NAME, template_name) end # Measure service stats Contrib::Analytics.set_measured(span) record_exception(span, payload) rescue StandardError => e Datadog.logger.debug(e.) end |
.span_name ⇒ Object
23 24 25 |
# File 'lib/ddtrace/contrib/action_view/events/render_partial.rb', line 23 def span_name Ext::SPAN_RENDER_PARTIAL end |