Add trace span for metadata fetching#778
Conversation
Signed-off-by: Wayne Zhang <qiwzhang@google.com>
| return; | ||
| } else if (!context->service_context()->service_control() || | ||
| context->method()->skip_service_control()) { | ||
| TRACE(trace_span) << "Service control check is not needed"; |
There was a problem hiding this comment.
I would be careful with this. This changes behavior that is publicly documented: https://cloud.google.com/endpoints/docs/openapi/tracing#spans_created_by_esp
At a minimum, ESP creates 4 spans per trace
We'll have to update this documentation, not sure if it will confuse pre-existing users to see spans suddenly disappear.
There was a problem hiding this comment.
On second though, less change, the better. So I will keep the old spans as they are.
| } | ||
| continuation(Status::OK); | ||
| }); | ||
| FetchMetadata( |
There was a problem hiding this comment.
Does FetchMetadata do retries? I assume we won't create multiple traces if that occurs. Maybe that is OK, just curious.
There was a problem hiding this comment.
It will do retry. But all retries will be in the same span,
|
|
||
| void QuotaControl(std::shared_ptr<context::RequestContext> context, | ||
| std::function<void(Status status)> continuation) { | ||
| std::shared_ptr<cloud_trace::CloudTraceSpan> trace_span( |
There was a problem hiding this comment.
Same comment about publicly documented behavior changing
|
Hold on. I will need trigger two more traces, Auth, and AuthFetch in cloud_trace.t |
|
PTAL |
Signed-off-by: Wayne Zhang qiwzhang@google.com
Also Not to create ServiceControlCheck and Quota span if it is not needed.