Sha256: 094e7e685fc0eb3cc5a0c1c1b7fd209146eefd2c42cc6e4011ee6f235be0e000

Contents?: true

Size: 689 Bytes

Versions: 27

Compression:

Stored size: 689 Bytes

Contents

module Skylight
  module Probes
    module ActiveJob
      TITLE = "ActiveJob.execute".freeze

      module Instrumentation
        def execute(*)
          Skylight.trace(TITLE, "app.job.execute", component: :worker) do |trace|
            # See normalizers/active_job/perform for endpoint/segment assignment
            super
          rescue Exception
            trace.segment = "error" if trace
            raise
          end
        end
      end

      class Probe
        def install
          ::ActiveJob::Base.singleton_class.prepend(Instrumentation)
        end
      end
    end

    register(:active_job, "ActiveJob::Base", "active_job/base", ActiveJob::Probe.new)
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
skylight-6.1.0.beta lib/skylight/probes/active_job.rb
skylight-6.0.4 lib/skylight/probes/active_job.rb
skylight-6.0.3 lib/skylight/probes/active_job.rb
skylight-5.3.5 lib/skylight/probes/active_job.rb
skylight-6.0.2 lib/skylight/probes/active_job.rb
skylight-6.0.1 lib/skylight/probes/active_job.rb
skylight-6.0.0 lib/skylight/probes/active_job.rb
skylight-6.0.0.beta2 lib/skylight/probes/active_job.rb
skylight-6.0.0.beta lib/skylight/probes/active_job.rb
skylight-5.3.4 lib/skylight/probes/active_job.rb
skylight-5.3.3 lib/skylight/probes/active_job.rb
skylight-5.3.2 lib/skylight/probes/active_job.rb
skylight-5.3.1 lib/skylight/probes/active_job.rb
skylight-5.3.0 lib/skylight/probes/active_job.rb
skylight-5.2.0 lib/skylight/probes/active_job.rb
skylight-5.2.0.beta2 lib/skylight/probes/active_job.rb
skylight-5.2.0.beta lib/skylight/probes/active_job.rb
skylight-5.1.1 lib/skylight/probes/active_job.rb
skylight-5.1.0.beta3 lib/skylight/probes/active_job.rb
skylight-5.1.0.beta2 lib/skylight/probes/active_job.rb