thrift_proxy: Fix success/error thrift metrics on passthrough#18415
Merged
mattklein123 merged 5 commits intoenvoyproxy:mainfrom Oct 6, 2021
Merged
thrift_proxy: Fix success/error thrift metrics on passthrough#18415mattklein123 merged 5 commits intoenvoyproxy:mainfrom
mattklein123 merged 5 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: James Fish <jfish@pinterest.com>
rgs1
suggested changes
Oct 4, 2021
Member
rgs1
left a comment
There was a problem hiding this comment.
A few nits to get started, I'll do another pass in before the next diaper change. Thanks!
| * @return true if reply type was successfully read, false if more data is required | ||
| * @throw EnvoyException if the data is not a valid payload | ||
| */ | ||
| virtual bool peekReplyPayload(Buffer::Instance& buffer, ReplyType& reply_type) PURE; |
Contributor
Author
There was a problem hiding this comment.
it could be but that opens a can of worms on the peek buffer helpers we have. Ill look into fixing that in a later PR i think unless you want to solve that here.
rgs1
suggested changes
Oct 4, 2021
source/extensions/filters/network/thrift_proxy/router/shadow_writer_impl.h
Outdated
Show resolved
Hide resolved
Signed-off-by: James Fish <jfish@pinterest.com>
Signed-off-by: James Fish <jfish@pinterest.com>
Signed-off-by: James Fish <jfish@pinterest.com>
Member
|
Over to @zuercher for merging. |
mattklein123
approved these changes
Oct 6, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: thrift_proxy: Fix success/error thrift metrics on passthrough
Additional Description: When performing thrift payload passthrough the downstream metric is always reporting success (until #18296 when neither are reported) and the upstream metric always increment error. Payload passthrough could not detect the reply type because that is encoded in the payload. When not using passthrough the detection was performed inside the connection manager and shadow writer with equivalent implementations. Therefore refactor the success/error detection to be done inside the decoder statemachine before performing payload passthrough at the thrift protocol level via a peek into the payload if message type is a reply.
Risk Level: low
Testing: unit/integ tests and deployed local
Docs Changes: N/A
Release Notes: bug fix.
Platform Specific Features: N/A
Fixes commit #PR or SHA: #13592 #15668