outboundHeaders method

Map<String, String> outboundHeaders()

The headers to attach to an outbound call so the next service joins this request rather than starting its own.

Implementation

Map<String, String> outboundHeaders() {
  return {
    requestIdHeader: requestId,
    if (traceparent case final value?) traceparentHeader: value,
    if (tracestate case final value?) tracestateHeader: value,
    if (encodedBaggage() case final value?) baggageHeader: value,
  };
}