Sha256: bf0da013446264b9261faff39e82aa22c16d108d2446b13c50921b0550361fe3

Contents?: true

Size: 922 Bytes

Versions: 12

Compression:

Stored size: 922 Bytes

Contents

# typed: false

require_relative 'events/discard'
require_relative 'events/enqueue'
require_relative 'events/enqueue_at'
require_relative 'events/enqueue_retry'
require_relative 'events/perform'
require_relative 'events/retry_stopped'

module Datadog
  module Tracing
    module Contrib
      module ActiveJob
        # Defines collection of instrumented ActiveJob events
        module Events
          ALL = [
            Events::Discard,
            Events::Enqueue,
            Events::EnqueueAt,
            Events::EnqueueRetry,
            Events::Perform,
            Events::RetryStopped,
          ].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_job/events.rb
ddtrace-1.8.0 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.7.0 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.6.1 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.6.0 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.5.2 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.5.1 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.5.0 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.4.2 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.4.1 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.4.0 lib/datadog/tracing/contrib/active_job/events.rb
ddtrace-1.3.0 lib/datadog/tracing/contrib/active_job/events.rb