class Datadog::OpenTracer::DistributedHeaders

def sampling_priority

def sampling_priority
  hdr = @carrier[Tracing::Distributed::Datadog::SAMPLING_PRIORITY_KEY]
  # It's important to make a difference between no header,
  # and a header defined to zero.
  return unless hdr
  value = hdr.to_i
  return if value < 0
  value
end