Skip to content

Instantly share code, notes, and snippets.

@mainroach
Created April 3, 2017 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mainroach/1265df8d445cea28a8e16baefed1014f to your computer and use it in GitHub Desktop.
Save mainroach/1265df8d445cea28a8e16baefed1014f to your computer and use it in GitHub Desktop.
def get(self):
with Trace("root", cloud_trace_context=self.request.headers.get('X-Cloud-Trace-Context')) as root:
self.response.headers.add_header('Content-Type',"text/plain")
time.sleep(0.1)
with root.span("slow"):
time.sleep(0.1)
self.response.write("You're traced!\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment