Sha256: 7c90fb8323b26fbb26474b07e8a964c63342119705d372ed50f16e1e8ff636ea

Contents?: true

Size: 765 Bytes

Versions: 5

Compression:

Stored size: 765 Bytes

Contents

# typed: false
require 'ddtrace/contrib/action_cable/event'
require 'ddtrace/contrib/action_cable/events/broadcast'
require 'ddtrace/contrib/action_cable/events/perform_action'
require 'ddtrace/contrib/action_cable/events/transmit'

module Datadog
  module Contrib
    module ActionCable
      # Defines collection of instrumented ActionCable events
      module Events
        ALL = [
          Events::Broadcast,
          Events::PerformAction,
          Events::Transmit
        ].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/action_cable/events.rb
ddtrace-0.54.1 lib/ddtrace/contrib/action_cable/events.rb
ddtrace-0.54.0 lib/ddtrace/contrib/action_cable/events.rb
ddtrace-0.53.0 lib/ddtrace/contrib/action_cable/events.rb
ddtrace-0.52.0 lib/ddtrace/contrib/action_cable/events.rb