Setting up metrics for Google Cloud endpoints

被刻印的时光 ゝ 提交于 2019-12-31 03:58:29

问题


I want to set up Google Cloud endpoints on a production server. What would be a good way to profile requests? Appstats support only WSGI requests.

Thanks in advance.


回答1:


I could actually solve this. Digging into endpoints, I could see that it is actually a WSGI server. And tested it with Appstats and works perfectly, it needs to be added to documentation.

In appengine_config.py, I did this:

def webapp_add_wsgi_middleware(app):
    from google.appengine.ext.appstats import recording
    app = recording.appstats_wsgi_middleware(app)
    return app
webapp_add_wsgi_middleware(api_app)

This works well on production too.



来源:https://stackoverflow.com/questions/32739458/setting-up-metrics-for-google-cloud-endpoints

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!