lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb in opentelemetry-instrumentation-sidekiq-0.24.3 vs lib/opentelemetry/instrumentation/sidekiq/middlewares/client/tracer_middleware.rb in opentelemetry-instrumentation-sidekiq-0.24.4

- old
+ new

@@ -10,9 +10,11 @@ module Middlewares module Client # TracerMiddleware propagates context and instruments Sidekiq client # by way of its middleware system class TracerMiddleware + include ::Sidekiq::ClientMiddleware if defined?(::Sidekiq::ClientMiddleware) + def call(_worker_class, job, _queue, _redis_pool) attributes = { SemanticConventions::Trace::MESSAGING_SYSTEM => 'sidekiq', 'messaging.sidekiq.job_class' => job['wrapped']&.to_s || job['class'], SemanticConventions::Trace::MESSAGING_MESSAGE_ID => job['jid'],