Sha256: d60c6a5b5700483c0e4ddc176eee75eb71118ffbec0ebdce6305924196dd147e

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 Bytes

Contents

# typed: false
require 'ddtrace/contrib/active_model_serializers/events/render'
require 'ddtrace/contrib/active_model_serializers/events/serialize'

module Datadog
  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

Version data entries

5 entries across 5 versions & 1 rubygems

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