Skip to content

http_service: finish supporting substitution formatter#44100

Merged
ggreenway merged 7 commits intoenvoyproxy:mainfrom
ggreenway:more-formatter
Mar 25, 2026
Merged

http_service: finish supporting substitution formatter#44100
ggreenway merged 7 commits intoenvoyproxy:mainfrom
ggreenway:more-formatter

Conversation

@ggreenway
Copy link
Copy Markdown
Member

Additional Description: This adds support for using the substitution formatter in all uses of request_headers_to_add in http_service.
Risk Level: Low
Testing: tests added
Docs Changes:
Release Notes: added
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
Fixes #43994

Claude code was used in creating this PR.

Signed-off-by: Greg Greenway <ggreenway@apple.com>
@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #44100 was opened by ggreenway.

see: more, trace.

Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #44100 was ready_for_review by ggreenway.

see: more, trace.

@kyessenov
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for substitution formatters in HttpService request headers across OpenTelemetry access loggers, the ext_proc filter, OpenTelemetry stat sinks, and Zipkin tracers. This involves refactoring header application using HttpServiceHeadersApplicator and updating related configurations and tests. A critical review comment points out a potential deadlock in HttpAccessLoggerCacheImpl::getOrCreateApplicator due to shared_ptr construction within a locked section. Another comment suggests removing redundant code and improving test robustness in ZipkinHttpServiceIntegrationTest.

Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Greg Greenway <ggreenway@apple.com>
@kyessenov
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the handling of HttpService headers across multiple Envoy extensions, including OpenTelemetry access loggers, the ext_proc filter, OpenTelemetry stats sinks, and OpenTelemetry and Zipkin tracers. It introduces a new HttpServiceHeadersApplicator utility class to centralize the parsing and application of request_headers_to_add, ensuring consistent support for substitution formatters. The change updates the http_service.proto definition and changelog to reflect this broader support. Corresponding unit and integration tests have been added or modified to verify the correct application of formatter-based headers in each affected extension. No feedback to provide.

@ggreenway ggreenway merged commit fc81ce7 into envoyproxy:main Mar 25, 2026
29 of 30 checks passed
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
)

This adds support for using the substitution formatter in all uses 
of `request_headers_to_add` in http_service.

Fixes envoyproxy#43994

Signed-off-by: Greg Greenway <ggreenway@apple.com>
TAOXUY pushed a commit to TAOXUY/envoy that referenced this pull request Apr 1, 2026
)

This adds support for using the substitution formatter in all uses
of `request_headers_to_add` in http_service.

Fixes envoyproxy#43994

Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Xuyang Tao <taoxuy@google.com>
citrus7 pushed a commit to citrus7/envoy that referenced this pull request Apr 1, 2026
)

This adds support for using the substitution formatter in all uses
of `request_headers_to_add` in http_service.

Fixes envoyproxy#43994

Signed-off-by: Greg Greenway <ggreenway@apple.com>
Signed-off-by: Jonathan Wu <jtwu@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for substitution formatters for request_headers_to_add in all uses of HttpService

3 participants