Skip to content

Instantly share code, notes, and snippets.

@mainroach
Created May 31, 2017 14:12
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/82681ef5c3acb5b22e21f7546cf63bcb to your computer and use it in GitHub Desktop.
Save mainroach/82681ef5c3acb5b22e21f7546cf63bcb to your computer and use it in GitHub Desktop.
class MainHandler(webapp2.RequestHandler):
def get(self):
# When on dev-server, this value isn't there. So we have to catch that.
TContext = "NNNN/NNNN;xxxxx"
if 'X-Cloud-Trace-Context' in self.request.headers:
TContext=self.request.headers.get('X-Cloud-Trace-Context')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment