Class: OpenTelemetry::Instrumentation::Resque::Instrumentation

Inherits:
Base
  • Object
show all
Defined in:
lib/opentelemetry/instrumentation/resque/instrumentation.rb

Overview

The Instrumentation class contains logic to detect and install the Resque instrumentation

Instance Method Summary collapse

Instance Method Details

#force_flushObject

Supported configuration keys for the install config hash:

force_flush: controls if spans are forcibly flushed upon job completion

  • :ask_the_job (default) - if Resque::Worker#fork_per_job? is set, all completed spans will be synchronously flushed at the end of a job's execution
  • :always - all completed spans will be synchronously flushed at the end of a job's execution
  • :never - the job will not intervene with the processing of spans

span_naming: when :job_class, the span names will be set to ' '. When :queue, the span names will be set to ' '

propagation_style: controls how the job's execution is traced and related to the trace where the job was enqueued. Can be one of:

  • :link (default) - the job will be executed in a separate trace. The initial span of the execution trace will be linked to the span that enqueued the job, via a Span Link.
  • :child - the job will be executed in the same logical trace, as a direct child of the span that enqueued the job.
  • :none - the job's execution will not be explicitly linked to the span that enqueued the job.


45
# File 'lib/opentelemetry/instrumentation/resque/instrumentation.rb', line 45

option :force_flush,       default: :ask_the_job, validate: %I[ask_the_job always never]