openzipkin / zipkin-ruby

zipkin-tracer ruby gem
Apache License 2.0
99 stars 40 forks source link

Spans are not sent to Zipkin sender when an error is thrown from a Sidekiq worker #172

Open ghost opened 4 years ago

ghost commented 4 years ago

When an error bubbles up from this line the trace spans are never flushed https://github.com/openzipkin/zipkin-ruby/blob/master/lib/zipkin-tracer/sidekiq/middleware.rb#L31

This results in spans missing from the trace context in a Zipkin UI.

Was this behavior intentional?

jfeltesse-mdsol commented 4 years ago

as the author of that middleware, @ayrat555 might be able to answer that question

ayrat555 commented 4 years ago

@brandon-zeeb-nw I think rescue (or ensure clause should be added to the middleware and send traces with exceptions there