Skip to content
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

Rename response.http.code #125

Merged
merged 1 commit into from
Feb 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/envoy/mixer/http_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const std::string kAttrNameResponseSize = "response.size";
const std::string kAttrNameResponseTime = "response.time";
const std::string kAttrNameOriginIp = "origin.ip";
const std::string kAttrNameOriginHost = "origin.host";
const std::string kResponseStatusCode = "response.status.code";
const std::string kResponseHttpCode = "response.http.code";

Attributes::Value StringValue(const std::string& str) {
Attributes::Value v;
Expand Down Expand Up @@ -133,11 +133,10 @@ void FillRequestInfoAttributes(const AccessLog::RequestInfo& info,
Int64Value(info.duration().count());
}
if (info.responseCode().valid()) {
attr->attributes[kResponseStatusCode] =
StringValue(std::to_string(info.responseCode().value()));
attr->attributes[kResponseHttpCode] =
Int64Value(info.responseCode().value());
} else {
attr->attributes[kResponseStatusCode] =
StringValue(std::to_string(check_status_code));
attr->attributes[kResponseHttpCode] = Int64Value(check_status_code);
}
}

Expand Down