Dst headers are encoded on outgoing requests so that downstream services are able to know how they are named by linkerd.
Dst headers are encoded on outgoing requests so that downstream
services are able to know how they are named by
linkerd. Specifically, the l5d-dst-residual
header may be
useful to services that act as proxies and need to determine the
next hop.
The l5d-err
header is set on all responses in which linkerd
encountered an error.
The l5d-err
header is set on all responses in which linkerd
encountered an error. It can be used to distinguish linkerd
responses from application responses.
The l5d-reqid
header is used to provide applications with a
The l5d-reqid
header is used to provide applications with a
token that can be used in logging to correlate requests. We use the _root_ span id so that this key can be used to correlate all related requests (i.e. in log messages) across services and linkerd instances.
The l5d-sample
lets clients determine the sample rate of a
given request.
The l5d-sample
lets clients determine the sample rate of a
given request. Tracers may, of course, choose to enforce
additional sampling, so setting this header cannot ensure that a
trace is recorded.
l5d-sample
values should be on [0.0, 1.0], however values
outside of this range are rounded to the nearest valid value so
that negative numbers are treated as 0 and positive numbers
greater than 1 are rounded to 1. At 1.0, the trace is marked as
sampled on all downstream requestes.
The finagle http stack manages a set of context headers that are read from server requests and written to client requests. The LinkerdHeaders module replaces these headers with linkerd-specific headers (prefixed by l5d-).
Context headers, read and written by each linkerd instance, include:
l5d-ctx-deadline
l5d-ctx-dtab
l5d-ctx-trace
Additionally, linkerd honors the following headers on incoming requests:
l5d-dtab
: a client-specified delegation overridel5d-sample
: a client-specified trace sample rate overrideIn addition to the context headers, linkerd may emit the following headers on outgoing requests:
l5d-dst-logical
: the logical name of the request as identified by linkerdl5d-dst-concrete
: the concrete client name after delegationl5d-dst-residual
: an optional residual path remaining after delegationl5d-reqid
: a token that may be used to correlate requests in a callgraph across services and linkerd instancesAnd in addition to the context headers, lay may emit the following headers on outgoing responses:
l5d-err
: indicates a linkerd-generated error. Error responses that do not have this header are application errors.