function acceptDistributedTraceHeaders(transportType, headers) {
  if (headers == null || typeof headers !== 'object') {
    logger.trace(
      'Ignoring distributed trace headers for transaction %s. Headers not passed in as object.',
      this.id
    )
    return
  }

  const transport = TRANSPORT_TYPES_SET[transportType] ? transportType : TRANSPORT_TYPES.UNKNOWN

  // assumes header keys already lowercase
  const traceparentHeader = headers[TRACE_CONTEXT_PARENT_HEADER]?.toString('utf8')
  const tracestateHeader = headers[TRACE_CONTEXT_STATE_HEADER]?.toString('utf8')

  if (traceparentHeader) {
    logger.trace('Accepting trace context DT payload for transaction %s', this.id)
    this.acceptTraceContextPayload(traceparentHeader, tracestateHeader, transport)
  } else if (NEWRELIC_TRACE_HEADER in headers) {
    logger.trace('Accepting newrelic DT payload for transaction %s', this.id)
    // assumes header keys already lowercase
    const payload = headers[NEWRELIC_TRACE_HEADER]
    this._acceptDistributedTracePayload(payload, transport)
  }
}
Parsing incoming headers for use in a distributed trace.
W3C TraceContext format is preferred over the NewRelic DT format.
NewRelic DT format will be used if no `traceparent` header is found.

@param {string} [transport='Unknown'] - The transport type that delivered the trace.
@param {object} headers - Headers to search for supported trace formats. Keys must be lowercase.