cloud-sql-proxy
cloud-sql-proxy copied to clipboard
Add support for metrics / tracing
Hi, It would be great to be able to track metrics from the proxy (connections, disconnects, etc) in prometheus. If you're open to a PR on this, I can create one
We intend to add metrics to the proxy, we were thinking of first starting with pushing metrics to stackdriver, but it makes sense to try to make it pluggable so others can write to different places.
Just wanted to reach back out on this issue, we plan to add monitoring to the proxy client using the OpenCensus library which has pluggable exports.
Nothing yet that we are ready to show publicly though.
Great news! @hfwang any idea on ETA for that?
If there's work already underway for this, is there an ETA yet?
We are hoping to have something available in October. The proxy client allows for some interesting setups that are a bit hard to express with the existing stackdriver library, namely reporting metrics to multiple projects simultaneously (as you could connect to instances in different projects), so progress has been a bit slower than expected.
Sorry for the delay, we had hoped to get something done by October. We had built a prototype, but actually getting it to a releasable state has dragged on quite a bit. We are still working on this though.
Any updates on this issue?
Is progress still being made on this front? Would love to have metrics for CloudSQL to see performance and be able to debug potential issues.
Is there any progress on this one ? We definitely need metrics for CloudSQL, as its in our critical path.
+1
Hoping this feature is underway, metrics from cloudsql-proxy would be super valuable
@hfwang Any progress on the possibilty of having metrics?
You could use the stackdriver_exporter as workaround.
@hfwang Any thoughts about how you want to implement this? I'd love to see support for Prometheus. Esp if I can get error/success rates for queries.
@bergquist to clarify, the proxy only touches the connection layer (and not the protocol layer).
You would see metrics around how often connections connect / disconnect but wouldn't see things like what queries were performed or if they were successful for not.
Note: this issue likewise includes support for Cloud Trace. See #600 for context.
Any update on this? I'd love to see this feature but it seems to keep getting knocked back due to some dependency or other?
Can we not separate the metrics and tracing cards and get them delivered independently?
I agree this is one of the top feature requests.
At the moment, we're a little hesitant to add support for metrics and tracing given the state of the two in the Go ecosystem. Presently, we're waiting on two things:
- Some major refactoring of the dialer functionality in the proxy (work currently in progress), and
- OpenTelemetry to go GA.
The refactoring will make adding support for metrics and tracing much, much less painful.
See https://github.com/kurtisvg/cloud-sql-go-connector#enabling-tracing where we've added support for tracing and metrics in the new dialer.
The v2 release (currently in public preview) has support for Prometheus, Cloud Monitoring, and Cloud Trace.
Get the release here: https://github.com/GoogleCloudPlatform/cloud-sql-proxy/releases/tag/v2.0.0.preview.0.
Docs here: https://github.com/GoogleCloudPlatform/cloud-sql-proxy#support-for-metrics-and-tracing.