Setting up metrics for Google Cloud endpoints

前端 未结 1 1362
不思量自难忘°
不思量自难忘° 2021-01-24 05: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条回答
  • 2021-01-24 05:53

    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.

    0 讨论(0)
提交回复
热议问题