Skip to content

Commit

Permalink
Always set response latency (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwzhang authored Mar 15, 2017
1 parent 76d96cd commit 4d1dbe0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/envoy/mixer/http_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ void FillRequestInfoAttributes(const AccessLog::RequestInfo& info,
attr->attributes[kResponseSize] = Attributes::Int64Value(info.bytesSent());
}

if (info.duration().count() > 0) {
attr->attributes[kResponseLatency] = Attributes::DurationValue(
std::chrono::duration_cast<std::chrono::nanoseconds>(info.duration()));
}
attr->attributes[kResponseLatency] = Attributes::DurationValue(
std::chrono::duration_cast<std::chrono::nanoseconds>(info.duration()));

if (info.responseCode().valid()) {
attr->attributes[kResponseHttpCode] =
Expand Down

0 comments on commit 4d1dbe0

Please sign in to comment.