Skip to content

Commit

Permalink
Update operation time reported to service control (envoyproxy#207)
Browse files Browse the repository at this point in the history
Do not use request start time as the operation start time when reporting
the operation to service control. Service control requires the operation
time to be recent (on the order of seconds). Given that a request can
have arbitrary latency, the start time of the request might be arbitrarily
old.
  • Loading branch information
gurgenh authored and qiwzhang committed Apr 11, 2017
1 parent 3864cce commit 970699f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/endpoints/src/api_manager/service_control/proto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ void SetOperationCommonFields(const OperationInfo& info,
op->set_consumer_id(std::string(kConsumerIdApiKey) +
std::string(info.api_key));
}
*op->mutable_start_time() = CreateTimestamp(info.request_start_time);
*op->mutable_start_time() = current_time;
*op->mutable_end_time() = current_time;
}

Expand Down

0 comments on commit 970699f

Please sign in to comment.