Module: Datadog::Tracing::Contrib::ActiveModelSerializers::Events::Serialize
- Defined in:
- lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb
Overview
Defines instrumentation for !serialize.active_model_serializers event
Constant Summary collapse
- EVENT_NAME =
'!serialize.active_model_serializers'.freeze
Class Method Summary collapse
- .event_name ⇒ Object
- .process(span, _event, _id, payload) ⇒ Object
- .span_name ⇒ Object
- .supported? ⇒ Boolean
Methods included from Datadog::Tracing::Contrib::ActiveModelSerializers::Event
Class Method Details
.event_name ⇒ Object
25 26 27 |
# File 'lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb', line 25 def event_name self::EVENT_NAME end |
.process(span, _event, _id, payload) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb', line 33 def process(span, _event, _id, payload) span.set_tag(Tracing::Metadata::Ext::TAG_OPERATION, Ext::TAG_OPERATION_SERIALIZE) (span, payload) rescue StandardError => e Datadog.logger.debug(e.) end |
.span_name ⇒ Object
29 30 31 |
# File 'lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb', line 29 def span_name Ext::SPAN_SERIALIZE end |
.supported? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb', line 17 def supported? Gem.loaded_specs['active_model_serializers'] \ && ( \ Gem.loaded_specs['active_model_serializers'].version >= Gem::Version.new('0.9') \ && Gem.loaded_specs['active_model_serializers'].version < Gem::Version.new('0.10') \ ) end |