You could try wrapping the Cloud Trace API call in a push task and 
executing it asynchronously at the end of the request which would save you 
needing to wait for the URL Fetch to complete inside the request handler. 
There isn't a way to 'piggy back' on top of the RPCs used internally (that 
is documented at least - you could always try poking around in the ApiProxy 
code in the SDK). There exists the RPC API 
<https://cloud.google.com/trace/api/> for Cloud Trace however the service 
definitions for generating gRPC client code are not yet available.

On Thursday, January 28, 2016 at 6:14:20 PM UTC-5, Alexander Bertram wrote:
>
> Hi there,
> I've started to look at using the new CloudTrace API to add information on 
> CloudSQL requests to traces on AppEngine requests, which we desperately 
> need, but I encountered two challenges:
>
> First, even batching all the traces for a request together in a single API 
> call adds about 100 ms latency to the request (that's the /urlfetch.Fetch 
> bar below), which I don't think I can stomach in production. Is there 
> anyway to piggy back custom trace data onto AppEngine's existing reporting 
> mechanism, which seems to run independently of requests? 
>
> Second, is there any way to detect which requests AppEngine has sampled 
> for tracing so that we only spend the time to report traces for those that 
> are sampled for RPC traces?
>
> Thanks,
> Alex
>
>
> <https://lh3.googleusercontent.com/-NPC894TI-ws/Vqqf5Kna_WI/AAAAAAAABKI/hwK5scVl5mM/s1600/trace.png>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0f0433fc-8351-427b-8ae8-8fcdf54d1943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to