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
Hi @kurigashvili-godaddy thanks for opening this issue. It seems reasonable to support passing the trace context to the sidekiq job. Since you've already identified all the relevant parts of the code, do you want to open a PR to add support?
Is your feature request related to a problem? Please describe.
I would like an ability to pass trace parent from request to sidekiq job so trace id for request and sidekiq is the same.
This is currently possible in APM for node.js
https://www.elastic.co/guide/en/apm/agent/nodejs/current/message-queues.html
I tried creating transaction in sidekiq middleware like this
But APM Sidekiq middleware always runs after and it fails with ExistingTransactionError. If it runs before, it still would have this issue.
https://github.com/elastic/apm-agent-ruby/blob/main/lib/elastic_apm/spies/sidekiq.rb#L32
https://github.com/elastic/apm-agent-ruby/blob/main/lib/elastic_apm/instrumenter.rb#L116
Possible solution
May be you can look for certain parameter on
job
object and use it to settrace_context
parameter.https://github.com/elastic/apm-agent-ruby/blob/main/lib/elastic_apm/spies/sidekiq.rb#L32
Client middleware can pass it similar to the example here https://github.com/sidekiq/sidekiq/wiki/Middleware#client-middleware
The text was updated successfully, but these errors were encountered: