lib/opentelemetry/instrumentation/resque/patches/resque_job.rb in opentelemetry-instrumentation-resque-0.3.1 vs lib/opentelemetry/instrumentation/resque/patches/resque_job.rb in opentelemetry-instrumentation-resque-0.4.0
- old
+ new
@@ -52,9 +52,14 @@
ensure
span.finish
end
end
end
+ ensure
+ if (config[:force_flush] == :ask_the_job && worker&.fork_per_job?) ||
+ config[:force_flush] == :always
+ OpenTelemetry.tracer_provider.force_flush
+ end
end
private
def tracer