Sha256: 63cf58d9568ad9efd61f9956f2776309dab7f3d27a3698116ba081c1b7d04090

Contents?: true

Size: 645 Bytes

Versions: 10

Compression:

Stored size: 645 Bytes

Contents

# frozen_string_literal: true

require 'dry-configurable'

module QueueClassicDatadog
  extend Dry::Configurable

  setting :dd_service

  def _perform(*args)
    service_name = QueueClassicDatadog.config.dd_service || 'qc.job'

    if Gem.loaded_specs['ddtrace'].version >= Gem::Version.new('1')
      Datadog::Tracing.trace('qc.job', service: service_name, resource: "#{name}#perform") do |_|
        super
      end
    else
      Datadog.tracer.trace('qc.job', service_name: 'qc.job', resource: "#{name}#perform") do |_|
        super
      end
    end
  end

  QueueClassicPlus::Base.singleton_class.send(:prepend, QueueClassicDatadog)
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
queue_classic_plus-4.0.0.alpha21 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha20 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha19 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha18 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha17 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha16 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha15 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha14 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha13 lib/queue_classic_plus/datadog.rb
queue_classic_plus-4.0.0.alpha12 lib/queue_classic_plus/datadog.rb