Manage Application-Defined Metadata Propagation
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.
As part of its support for application-defined metadata propagation, ESS provides the following configurations to customize the propagation:
INRUPT_REQUEST_METADATA_PROPAGATOR_HEADER_ALLOW
Adds specified non-baggage request headers to the baggage for propagation (unless also specified in the corresponding *_DENY
configuration); i.e., support propagation of non-baggage headers as application-defined properties. This configuration is case-insensitive.
INRUPT_REQUEST_METADATA_REFLECTOR_HEADER_ALLOW
Determines which propagated properties can be returned as response headers (unless also specified in the corresponding *_DENY
configuration). This configuration is case-sensitive to the entries in the propagated baggage.
INRUPT_LOGGING_REQUEST_METADATA_ALLOW
Determines which propagated properties can be included in associated log messages (unless also specified in the corresponding *_DENY
configuration). This configuration is case-sensitive to the propagated baggage entries.
INRUPT_AUDIT_PRODUCER_REQUEST_METADATA_ALLOW
Determines which propagated properties can be included in associated audit events
(unless also specified in the corresponding *_DENY
configuration). This configuration is case-sensitive to the propagated baggage entries.
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 notmy-client-version
).
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 thekustomization.yaml
file under thepatches
key:
# 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"
Continue with the rest of the Applying Your Customizations procedure.
Last updated