Get request from logging for Google App Engine (flexible environment)

111 views
Skip to first unread message

Lu Rocky

unread,
Jun 22, 2016, 5:21:10 PM6/22/16
to Google App Engine
Hi I am immigrating an app from standard environment to flexible environment. But I am facing a problem, in the standard environment I have built a flask server using python, and whenever I receive a HTTP get, I record the request ID for the request log by "os.environ.get('REQUEST_LOG_ID')". This help me to check the request log in the future easily. This method is also taught on Google's document with topic "How requests are handled" (https://cloud.google.com/appengine/docs/python/how-requests-are-handled). But now in the flexible environment, I find there is no "'REQUEST_LOG_ID" in the result returned by "os.environ". And I can not find any instruction on how to get request id in flexible environment (the request id is still exist, I can see the request id in the request log). So is there any way to get the request id?

Thanks so much for any help!

Nick (Cloud Platform Support)

unread,
Jun 23, 2016, 7:47:43 PM6/23/16
to Google App Engine
Hey Lu,

It appears that the Flex environment doesn't work the same way, and that os.environ["REQUEST_LOG_ID"] is not automatically populated by the runtime. You should open a Public Issue Tracker issue to get any potential defect reports / feature requests regarding standard/flexible environment differences sorted out. We monitor that issue tracker and we'll be in touch shortly after you post. 

Cheers,

Nick
Cloud Platform Community Support

Nick (Cloud Platform Support)

unread,
Jun 24, 2016, 3:21:07 PM6/24/16
to Google App Engine
Hey Lu,

Be sure to post the issue link here once you've created it. I'll be happy to help work on the feature request!

Sincerely,


Nick
Cloud Platform Community Support

On Wednesday, June 22, 2016 at 5:21:10 PM UTC-4, Lu Rocky wrote:

Lu Rocky

unread,
Jun 24, 2016, 4:53:56 PM6/24/16
to Google App Engine
Hi Nick,

Thanks for your suggestion, I have post the issue, and here is the link for issue is:

Sincerely,
Rocky

Nick (Cloud Platform Support)

unread,
Jun 30, 2016, 8:00:49 PM6/30/16
to Google App Engine
Hey Lu,

We've taken a look at the issue, and engineering is now working on it, but of course you've seen that from the thread itself. Just wanted to say thanks again for making a report and linking it here. 

Cheers,


Nick
Cloud Platform Community Support

Reply all
Reply to author
Forward
0 new messages