Skip to content

ext_proc: fix a call stats logging issue#42055

Merged
yanavlasov merged 3 commits intoenvoyproxy:mainfrom
yanjunxiang-google:no_body_trailer_stats
Nov 21, 2025
Merged

ext_proc: fix a call stats logging issue#42055
yanavlasov merged 3 commits intoenvoyproxy:mainfrom
yanjunxiang-google:no_body_trailer_stats

Conversation

@yanjunxiang-google
Copy link
Copy Markdown
Contributor

@yanjunxiang-google yanjunxiang-google commented Nov 16, 2025

In STREAMED or FULL_DUPLEX_STREAMED mode, the body or trailers stats are sometime not logged.
This is due to a bug in ext_proc logging implementation which only do the logging when the call_start_time_ is set. However, in STREAMED or FULL_DUPLEX_STREAMED body mode cases, there could be multiple data chunks are sent to the server, and the 1st response will clear the call_start_time_. This causes the rest body responses won't be logged.
The solution is to not clear call_start_time_ when a response is received.

Signed-off-by: Yanjun Xiang <yanjunxiang@google.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: #42055 was opened by yanjunxiang-google.

see: more, trace.

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
@yanjunxiang-google yanjunxiang-google marked this pull request as ready for review November 17, 2025 17:56
@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

/assign @yanavlasov @tyxia

Copy link
Copy Markdown
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, module one comment.

Thanks

Comment thread source/extensions/filters/http/ext_proc/processor_state.cc
Copy link
Copy Markdown
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, module one nit (which is up to you) Thanks

@yanjunxiang-google
Copy link
Copy Markdown
Contributor Author

Thanks @tyxia for approval!

@yanavlasov yanavlasov merged commit a01d3bd into envoyproxy:main Nov 21, 2025
24 checks passed
grnmeira pushed a commit to grnmeira/envoy that referenced this pull request Mar 20, 2026
In STREAMED or FULL_DUPLEX_STREAMED mode, the body or trailers stats are
sometime not logged.
This is due to a bug in ext_proc logging implementation which only do
the logging when the call_start_time_ is set. However, in STREAMED or
FULL_DUPLEX_STREAMED body mode cases, there could be multiple data
chunks are sent to the server, and the 1st response will clear the
call_start_time_. This causes the rest body responses won't be logged.
The solution is to not clear call_start_time_ when a response is
received.

---------

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
Signed-off-by: Gustavo <grnmeira@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants