Is there any way to trace cloud sql calls in app engine?

别来无恙 提交于 2019-12-22 12:23:40

问题


I am trying to optimise performance in an app-engine Java app using cloud sql gen2. It would help a lot if I could trace calls to cloud sql just like I can trace RPC calls to the datastore in the stackdriver trace details. Is this somehow possible, or maybe planned? Or is the only alternative to do log.info() calls with milliseconds? Or is there some other way to add event markers for tracing / profiling?


回答1:


There's now Google Cloud Trace for JDBC for exactly this use case.

Google Cloud Trace for JDBC is a custom JDBC driver which intercepts calls to the actual JDBC driver (e.g. Cloud SQL's) and collects and sends latency data about JDBC calls to Stackdriver Trace for visualization in the Google Cloud Console.

Here's how the trace details look like in the Google Cloud Console for an example request:

Please see the Github page for Google Cloud Trace for JDBC for more details. I'm happy to help with any issues (I'm the author).



来源:https://stackoverflow.com/questions/40002975/is-there-any-way-to-trace-cloud-sql-calls-in-app-engine

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