You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class EnqueueController < ApplicationController
def create
MyJob.perform_in(2.seconds, 'bob', 5)
render plain: OpenTelemetry::Trace.current_span.context.trace_id.unpack1('H*')
end
end
and here i can see sidekiq publish job
and here is the sidekiq job in a separate trace
my question is: how i can have sidekiq job in the 2nd photo as a child span for sidekiq publish job in the 1st photo ?
The text was updated successfully, but these errors were encountered:
Is trace propagation otherwise working in your app? If not, have you set a propagator in your config (e.g. OTEL_PROPAGATORS=trace_context)?
i realized that trace correlation works whenever i use perform_async in sidekiq, but whenever i use perform_in the sidekiq worker executes in a separate trace
It's possible this is a Jaeger issue, if it's an issue at all.
By explicitly delaying the start of the sidekiq job, you are decoupling the request from the job — the start of the job span will most likely be greater than the end of the root span, implying they are not the same trace, so this is probably more appropriately done with a span link. I don't know enough about Jaeger to know whether it treats that situation as invalid, so it might be useful to check whether or not your sidekiq spans actually have the trace context on them (e.g. to narrow down whether it is jaeger or opentelemetry-ruby/sidekiq that is responsible). Can you set OTEL_TRACES_EXPORTER=console and inspect the output?
the context is not being propagated from sidekiq publish to sidekiq job
Share details about your runtime
Operating system details: Linux, Ubuntu 20.04 LTS
RUBY_ENGINE: "ruby"
RUBY_VERSION: "3.3.0"
RUBY_DESCRIPTION: "ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]"
Share a simplified reproduction if possible
initializer/otel.rb
controllers/enqueue_controller.rb
and here i can see sidekiq publish job
and here is the sidekiq job in a separate trace
my question is: how i can have sidekiq job in the 2nd photo as a child span for sidekiq publish job in the 1st photo ?
The text was updated successfully, but these errors were encountered: