Manage Application-Defined Metadata Propagation#
Starting in 2.2, ESS adds support for application-defined metadata/properties; specifically, ESS adds support for baggage HTTP header. These application-defined properties can be included in audit messages and log messages as well as returned as response headers. ESS further expands on this support by providing configuration to add non-baggage request headers to the baggage for propagation within its system. [1]
As part of its support for application-defined metadata propagation, ESS provides the following configurations to customize the propagation:
|
|
|
|
|
|
|
|
|
Example Customization#
The following example configuration updates:
INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW
to include the client requestx-correlation-id
,x-request-id
, andmy-client-version
headers as baggage entries.INRUPT_LOGGING_REQUEST_METADATA_ALLOW
to include the propagatedx-correlation-id
,x-request-id
, andmy-client-version
in the associated log messages.INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_ALLOW
to include the propagatedx-correlation-id
,x-request-id
, andmy-client-version
in the associated audit events.INRUPT_LOGGING_REQUEST_METADATA_ALLOW
to return the propagatedx-correlation-id
andx-request-id
as response headers (and not``my-client-version``).
Tip
INRUPT_LOGGING_REQUEST_METADATA_ALLOW
,
INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_ALLOW
, and
INRUPT_REQUEST_METADATA_REFLECTOR_HEADER_ALLOW
are
case-sensitive to the entries in the propagated baggage. If the
propagated baggage includes properties from
INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW
configuration,
ensure that the cases of those properties match.
Go to your ESS installation directory:
cd ${HOME}/ess
Modify the
kustomization.yaml
(i.e., step 3 of the Applying Your Customizations procedure).Specifically, add the highlighted content to the
kustomization.yaml
file under thepatches
key:Tip
If
patches
list does not exist inkustomization.yaml
, add the keypatches
as well.# kustomization.yaml in your ESS installation directory # ... Preceding content omitted for brevity # ... patches: - target: kind: Deployment labelSelector: quarkus=true patch: |- - op: add path: /spec/template/spec/containers/0/env/- value: #Adds the following request headers to the `baggage` for propagation name: INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW value: "x-correlation-id,x-request-id,my-client-version" - op: add path: /spec/template/spec/containers/0/env/- value: #Return the following propagated properties as response headers name: INRUPT_REQUEST_METADATA_REFLECTOR_HEADER_ALLOW value: "x-correlation-id,x-request-id" - op: add path: /spec/template/spec/containers/0/env/- value: #Include the following propagated properties in log messages name: INRUPT_LOGGING_REQUEST_METADATA_ALLOW value: "x-correlation-id,x-request-id,my-client-version," - op: add path: /spec/template/spec/containers/0/env/- value: #Include the following propagated properties in audit events name: INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_ALLOW value: "x-correlation-id,x-request-id,my-client-version"
Tip
When returning application-defined properties as response headers, you may need to update
QUARKUS_HTTP_CORS_EXPOSED_HEADERS
to extend the list of CORS-safelisted response headers.Continue with the rest of the Applying Your Customizations procedure.