Cloud Trace API

68 views
Skip to first unread message

Jay Kyburz

unread,
Feb 29, 2016, 7:23:02 PM2/29/16
to Google App Engine
Is it possible to log custom events for Cloud Trace in my Python App Engine App?

THe Docs seems to suggest its possible but a nice clear example would really help.

Adam (Cloud Platform Support)

unread,
Feb 29, 2016, 11:02:51 PM2/29/16
to Google App Engine
I've created a Gist with a basic example of how to post a single test trace using the JSON API, which you should be able to extrapolate from. This uses the Google API Client Library for Python.

troberti

unread,
Mar 1, 2016, 4:26:15 AM3/1/16
to Google App Engine
I would rather see something more integrated into App Engine. It would be very nice if custom traces could piggyback on the way the 'normal' cloud trace are gathered, so without adding extra urlfetch overhead. 

Qi Ke

unread,
Mar 1, 2016, 12:20:38 PM3/1/16
to Google App Engine
Thanks for the request. We are actively working on it.

- We've already added an API to expose Trace Context to the JAVA and python runtime. The one for Python runtime will be available in next GAE release.
- After you get the Trace Context, you can use that to create your custom spans and the data you send over using our JSON API will join the server side data and be rendered and analyzed together.
- Make sure to call the API asynchronously to avoid adding latency to your request handling.
- We are also working on a built-in version of the trace API so that users don't have to use the JSON API on GAE, but that work is not the highest priority in the queue.

Hope this helps.
Qi

Jay Kyburz

unread,
Mar 1, 2016, 3:32:50 PM3/1/16
to Google App Engine
Great news. Thanks Qi Ke

Jay Kyburz

unread,
Mar 1, 2016, 3:33:27 PM3/1/16
to Google App Engine
Thanks very much Adam!
Reply all
Reply to author
Forward
0 new messages