Skip to content

Conversation

@melginaldi
Copy link
Contributor

@melginaldi melginaldi commented Oct 17, 2025

Commit Message: Add bits to the FilterState in ExtProcLoggingInfo for when an immediate response is sent and when continue_and_replace is used.
Additional Description: These bits will be useful for internal debugging. Continue and Replace is only relevant for request and response headers.
Risk Level: Low
Testing: Unit Integration tests

Docs Changes: N/A
Release Notes: Add new bits into ExtProcLoggingInfo for Immediate Response occurrence and ContinueAndReplace.
Platform Specific Features: N/A

/assign @yanjunxiang-google

@repokitteh-read-only
Copy link

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: #41602 was opened by melginaldi.

see: more, trace.

@melginaldi melginaldi marked this pull request as ready for review October 17, 2025 19:41
@melginaldi
Copy link
Contributor Author

/assign @yanjunxiang-google

@RyanTheOptimist
Copy link
Contributor

/assign @tyxia

Copy link
Member

@tyxia tyxia left a comment

Choose a reason for hiding this comment

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

LGTM in general. Thanks for contribution!

I will let @yanjunxiang-google review it as well

@tyxia
Copy link
Member

tyxia commented Nov 2, 2025

/wait

Signed-off-by: Melissa Ginaldi <[email protected]>
Signed-off-by: Melissa Ginaldi <[email protected]>
Signed-off-by: Melissa Ginaldi <[email protected]>
@adisuissa
Copy link
Contributor

@yanjunxiang-google can you PTAL?

envoy::config::core::v3::TrafficDirection traffic_direction);
envoy::config::core::v3::TrafficDirection traffic_direction,
bool continue_and_replace = false);
void setImmediateResponse() { immediate_response_ = true; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change this into setImmediateResponse(bool immediate_response) {immediate_response_ = immediate_response; } ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally, I like it it the way it is. Since the default value is false when the variable is created ext_proc.h L 151 (https://github.com/envoyproxy/envoy/pull/41602/files#diff-d95000cdea207e2cf306d30b1706750b57a8228c25f01b0f8b4df0f22bf033c7R151) I think it makes more sense that "set" implies you are changing the value to true.

However, this is not a very strong opinion and I am happy to make the change if you feel strongly it should take in a variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just thought do you ever need to call setImmediateResponse() to set it to false. Small thing, up to you

@yanjunxiang-google
Copy link
Contributor

Thanks for working on this. Just a few nit comments. The data structure definition is following what we discussed offline. Overall LGTM.

Signed-off-by: Melissa Ginaldi <[email protected]>
Signed-off-by: Melissa Ginaldi <[email protected]>
@yanjunxiang-google
Copy link
Contributor

yanjunxiang-google commented Nov 13, 2025

/wait

@tyxia
Copy link
Member

tyxia commented Nov 13, 2025

Could you elaborate on the motivation and use case ?

continue_and_replace and immediate_response appears to be a niche/specical case, compared to universally applicable fields like call_status, callback_state, and traffic_direction in ext_proc.

Also, if it is for debugging, can we use Envoy trace/log

@tyxia
Copy link
Member

tyxia commented Nov 13, 2025

/wait

@yanjunxiang-google
Copy link
Contributor

yanjunxiang-google commented Nov 14, 2025

@melginaldi Actually, can we add an Envoy global immediate_response stats and continue_and_replace stats counters here:

#define ALL_EXT_PROC_FILTER_STATS(COUNTER) \
. It gives us good idea on these events as well. What's the benefit to put them into a per call stats?

Copy link
Contributor

@yanjunxiang-google yanjunxiang-google left a comment

Choose a reason for hiding this comment

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

please address the left over comments. Dismiss the previous approval.

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.

5 participants