-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add mixer error details into metadata #2093
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,5 +139,21 @@ Status ParseJsonMessage(const std::string& json, Message* output) { | |
| return ::google::protobuf::util::JsonStringToMessage(json, output, options); | ||
| } | ||
|
|
||
| void CheckResponseInfoToStreamInfo( | ||
| const istio::mixerclient::CheckResponseInfo& check_response, | ||
| StreamInfo::StreamInfo& stream_info) { | ||
| static std::string metadata_key = "istio.mixer"; | ||
|
|
||
| if (!check_response.response_status.ok()) { | ||
| stream_info.setResponseFlag( | ||
| StreamInfo::ResponseFlag::UnauthorizedExternalService); | ||
| ProtobufWkt::Struct metadata; | ||
| auto& fields = *metadata.mutable_fields(); | ||
| fields["status"].set_string_value( | ||
| check_response.response_status.ToString()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need the new attribute
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See istio/istio#10965 for context, it is for putting descriptive message in access log. We can erase this from reporting bag, is report collecting all dynamic metadata?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know, but it looks like all metadata is sent over. I don't think we want redundant data since it adds no value and has performance costs. Please delete this "istio.mixer" from reporting bag.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| stream_info.setDynamicMetadata(metadata_key, metadata); | ||
| } | ||
| } | ||
|
|
||
| } // namespace Utils | ||
| } // namespace Envoy | ||
Uh oh!
There was an error while loading. Please reload this page.