Sha256: 1da9dfc5bfa4d089676d43f7d4cae977a10f5913a36e3736a27e880152ecb74b

Contents?: true

Size: 670 Bytes

Versions: 12

Compression:

Stored size: 670 Bytes

Contents

# typed: false

require_relative 'events/render'
require_relative 'events/serialize'

module Datadog
  module Tracing
    module Contrib
      module ActiveModelSerializers
        # Defines collection of instrumented ActiveModelSerializers events
        module Events
          ALL = [
            Events::Render,
            Events::Serialize
          ].freeze

          module_function

          def all
            self::ALL
          end

          def subscriptions
            all.collect(&:subscriptions).collect(&:to_a).flatten
          end

          def subscribe!
            all.each(&:subscribe!)
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.8.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.7.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.6.1 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.6.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.5.2 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.5.1 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.5.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.4.2 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.4.1 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.4.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb
ddtrace-1.3.0 lib/datadog/tracing/contrib/active_model_serializers/events.rb