-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
golang: add OnStreamComplete callback to mutate final metadata #35742
Conversation
As discussed from https: //github.com/envoyproxy/pull/35595#issuecomment-2278413889, the `AccessLogHandler::log` is not designed for mutating the StreamInfo. It's recommended to use `OnStreamComplete` to do the final metadata management. Signed-off-by: spacewander <[email protected]>
CC @doujiang24 |
I wanted to confirm whether or not this fixes #30859 as AccessLogger will access dynamicMetadata after WASM writes to it? |
No, this change is only about the Golang filter. If we want to support this in Wasm, we need to add OnStreamComplete callback in Wasm too. |
Assigning @doujiang24 as codeowner |
/assign-from @envoyproxy/envoy-maintainers |
@envoyproxy/envoy-maintainers assignee is @RyanTheOptimist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, lgtm~
@spacewander I am unsure if the onStreamComplete callback is already added in Wasm, as per envoy/http/filter.h and envoy/source/common/http/filter_manager.h. In this case, would moving the onStreamComplete call to after the destroyFilters() (which uses onDestroy) call in envoy/source/common/http/conn_manager_impl.cc provide the desired change? Thanks for the help! |
No, the wasm filter doesn't override the onStreamComplete so it's empty for Wasm. |
…proxy#35742) As discussed from envoyproxy#35595 (comment), the `AccessLogHandler::log` is not designed for mutating the StreamInfo. It's recommended to use `OnStreamComplete` to do the final metadata management. Signed-off-by: spacewander <[email protected]>
As discussed from #35595 (comment), the
AccessLogHandler::log
is not designed for mutating the StreamInfo. It's recommended to useOnStreamComplete
to do the final metadata management.Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]