Skip to content

Add opt-out UuidRequestIdConfig in HCM to prevent x-request-id modifications #6750

@Inode1

Description

@Inode1

Description:
Currently, Envoy Gateway configures the HTTP listener with UuidRequestIdConfig and pack_trace_reason set to true by default. This changes the generated x-request-id format from UUID v8 to UUID v4.
Example:
send: 019812b7-16be-83d1-a090-c0aaf452e0d0
receive: 019812b7-16be-43d1-a090-c0aaf452e0d0

We rely on the original x-request-id for compatibility with downstream systems, logging parsers, or correlation ID pipelines without any bit modifications for trace reasons.

When pack_trace_reason is enabled (is by default), Envoy modifies the x-request-id (even if already present) to conform to UUID v4 trace packing format, which breaks these assumptions.

Proposed solution:
Add opt-out field in EnvoyProxy.spec.telemetry.tracing:

requestIdExtension:
  // false by default
  packTraceReason: false

This will set in HCM:

        request_id_extension:
          typed_config:
            '@type': type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig
            pack_trace_reason: false

[optional Relevant Links:]
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/request_id/uuid/v3/uuid.proto#extensions-request-id-uuid-v3-uuidrequestidconfig
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#extension-category-envoy-request-id

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions