Sha256: aafeaf794ec1e26d15072bd00518062b6df56313a70ea4eba8851aeda20427db

Contents?: true

Size: 970 Bytes

Versions: 17

Compression:

Stored size: 970 Bytes

Contents

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
          SPAN_NAME = 'active_model_serializers.serialize'.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
            self::SPAN_NAME
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ddtrace-0.16.1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.16.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.2.disableprotocolversion4 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.15.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.2.withoutpriorityparsing1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.2 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.15.0.beta1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.0.rc1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.13.2 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.0.beta2 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.14.0.beta1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.13.1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.13.0 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb
ddtrace-0.13.0.beta1 lib/ddtrace/contrib/active_model_serializers/events/serialize.rb