有什么方法可以在应用程序引擎中跟踪云端SQL调用吗? [英] Is there any way to trace cloud sql calls in app engine?

查看:201
本文介绍了有什么方法可以在应用程序引擎中跟踪云端SQL调用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在使用云sql gen2的应用程序引擎Java应用程序中优化性能。如果我可以跟踪对云端sql的调用,就好像我可以在堆栈驱动程序跟踪详细信息中跟踪对数据存储的RPC调用一样,这将有很大帮助。
这是否有可能,或者可能计划?或者是以毫秒执行log.info()调用的唯一选择?或者是否有其他一些方法来添加事件标记以进行跟踪/分析? 现在有了解更多详情。我很乐意帮助解决任何问题(我是作者)。


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?

解决方案

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).

这篇关于有什么方法可以在应用程序引擎中跟踪云端SQL调用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆