cloud-sql-proxy icon indicating copy to clipboard operation
cloud-sql-proxy copied to clipboard

Add support for metrics / tracing

Open chainlink opened this issue 7 years ago • 19 comments

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

chainlink avatar May 30 '18 13:05 chainlink

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.

hfwang avatar May 31 '18 23:05 hfwang

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.

hfwang avatar Jul 24 '18 04:07 hfwang

Great news! @hfwang any idea on ETA for that?

chainlink avatar Jul 24 '18 13:07 chainlink

If there's work already underway for this, is there an ETA yet?

tanuck avatar Aug 14 '18 14:08 tanuck

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.

hfwang avatar Aug 21 '18 05:08 hfwang

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.

hfwang avatar Nov 15 '18 18:11 hfwang

Any updates on this issue?

oliveiraVG avatar Feb 06 '19 12:02 oliveiraVG

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.

sergio-fleetsmith avatar Apr 01 '19 19:04 sergio-fleetsmith

Is there any progress on this one ? We definitely need metrics for CloudSQL, as its in our critical path.

kishendas avatar Apr 15 '19 23:04 kishendas

+1

marcosrmendezthd avatar May 08 '19 18:05 marcosrmendezthd

Hoping this feature is underway, metrics from cloudsql-proxy would be super valuable

jbradleynh avatar Aug 15 '19 13:08 jbradleynh

@hfwang Any progress on the possibilty of having metrics?

mariolameiras avatar Nov 12 '19 14:11 mariolameiras

You could use the stackdriver_exporter as workaround.

elsbrock avatar Nov 12 '19 15:11 elsbrock

@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 avatar Oct 06 '20 12:10 bergquist

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

kurtisvg avatar Oct 12 '20 22:10 kurtisvg

Note: this issue likewise includes support for Cloud Trace. See #600 for context.

enocom avatar Feb 10 '21 20:02 enocom

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?

withnale avatar Apr 23 '21 12:04 withnale

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:

  1. Some major refactoring of the dialer functionality in the proxy (work currently in progress), and
  2. OpenTelemetry to go GA.

The refactoring will make adding support for metrics and tracing much, much less painful.

enocom avatar Apr 23 '21 15:04 enocom

See https://github.com/kurtisvg/cloud-sql-go-connector#enabling-tracing where we've added support for tracing and metrics in the new dialer.

enocom avatar Sep 30 '21 21:09 enocom

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.

enocom avatar Aug 29 '22 20:08 enocom