lib/minato/trace/middleware/distributed_trace_context.rb in minato-trace-0.1.6.pre.6 vs lib/minato/trace/middleware/distributed_trace_context.rb in minato-trace-0.1.6.pre.7

- old
+ new

@@ -17,10 +17,10 @@ end private def add_trace_context_header(env) - return unless Rails.env.production? && Minato::Trace.enabled? + return unless (Rails.env.production? && Minato::Trace.enabled?) || current_cloud_trace.nil? env.request_headers.merge!({ "#{TRACE_HEADER_KEY}": "#{current_cloud_trace.trace.trace_id};o=1" }) end def current_cloud_trace