lib/opentelemetry/instrumentation/sidekiq/patches/processor.rb in opentelemetry-instrumentation-sidekiq-0.24.3 vs lib/opentelemetry/instrumentation/sidekiq/patches/processor.rb in opentelemetry-instrumentation-sidekiq-0.24.4

- old
+ new

@@ -16,9 +16,17 @@ if instrumentation_config[:trace_processor_process_one] attributes = {} attributes[SemanticConventions::Trace::PEER_SERVICE] = instrumentation_config[:peer_service] if instrumentation_config[:peer_service] tracer.in_span('Sidekiq::Processor#process_one', attributes: attributes) { super } else + super + end + end + + def fetch + if instrumentation_config[:trace_processor_process_one] + super + else OpenTelemetry::Common::Utilities.untraced { super } end end def tracer