class LHC::Zipkin

def before_request

def before_request
  return if !dependencies? || !tracing?
  ZipkinTracer::TraceContainer.with_trace_id(trace_id) do
    # add headers even if the current trace_id should not be sampled
    B3_HEADERS.each { |method, header| request.headers[header] = trace_id.send(method).to_s }
    # only sample the current call if we're instructed to do so
    start_trace! if ::Trace.tracer && trace_id.sampled?
  end
end