Sha256: ddd30993381ab718b58183fb1bd868681deae3daf75426bab4508d83b848b20f

Contents?: true

Size: 826 Bytes

Versions: 5

Compression:

Stored size: 826 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 render.active_model_serializers event
        module Render
          include ActiveModelSerializers::Event

          EVENT_NAME = 'render.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.10')
          end

          def event_name
            self::EVENT_NAME
          end

          def span_name
            Ext::SPAN_RENDER
          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/render.rb
ddtrace-0.54.1 lib/ddtrace/contrib/active_model_serializers/events/render.rb
ddtrace-0.54.0 lib/ddtrace/contrib/active_model_serializers/events/render.rb
ddtrace-0.53.0 lib/ddtrace/contrib/active_model_serializers/events/render.rb
ddtrace-0.52.0 lib/ddtrace/contrib/active_model_serializers/events/render.rb