Sha256: 832a3c5ad8b95233f19300a9eb8751cb6ae8013e15f39c301124e4836e95f9de

Contents?: true

Size: 978 Bytes

Versions: 5

Compression:

Stored size: 978 Bytes

Contents

# typed: false
require 'ddtrace/contrib/active_model_serializers/ext'
require 'ddtrace/contrib/active_model_serializers/event'

module Datadog
  module Contrib
    module ActiveModelSerializers
      module Events
        # Defines instrumentation for !serialize.active_model_serializers event
        module Serialize
          include ActiveModelSerializers::Event

          EVENT_NAME = '!serialize.active_model_serializers'.freeze

          module_function

          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

          def event_name
            self::EVENT_NAME
          end

          def span_name
            Ext::SPAN_SERIALIZE
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-0.54.2 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.54.1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.54.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.53.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.52.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb