Conversation
5ac6cf3 to
c5b9ab5
Compare
|
I'll resolve these conflicts shortly here. |
|
|
b85e31f to
a862a83
Compare
This commit adds the OpenTelemetry-based wiring to report on internal operations to improve connectivity. To disable this internal metric collection, set enable_builtin_telemetry to False when creating a Connetor or AsyncConnector. Fixes #449
| attrs.dial_status = DIAL_SUCCESS | ||
| latency_ms = (time.monotonic() - start_time) * 1000 | ||
| mr.record_dial_count(attrs) | ||
| mr.record_dial_latency(latency_ms) |
There was a problem hiding this comment.
Are you missing record_open_connections here? The sync connector records this
| expires. | ||
| enable_builtin_telemetry (bool): Enable built-in telemetry that | ||
| reports connector metrics to the | ||
| alloydb.googleapis.com/client/connector metric prefix in |
There was a problem hiding this comment.
Is this a public Cloud Monitoring metric? Can customers view this metric? I don't see it in this list: https://docs.cloud.google.com/monitoring/api/metrics_gcp_a_b.
Or is this an internal Monarch metric?
|
|
||
| def __del__(self) -> None: | ||
| try: | ||
| if getattr(self, "_closed", True) is False: |
There was a problem hiding this comment.
nit: To simplify this, I think you can just call if not self._closed
|
Superseded by a 9-PR stack that splits this work into reviewable pieces, starting at #566. The content is the same feature with two deliberate changes: Splitting it also turned up an unrelated bug that was hiding in the restructuring — Closing in favour of the stack. |
This commit adds the OpenTelemetry-based wiring to report on internal operations to improve connectivity. To disable this internal metric collection, set enable_builtin_telemetry to False when creating a Connector or AsyncConnector.
Note: the synchronous connector provides a full port of system metrics. The asynchronous connector by comparison cannot support bytes sent and bytes received because asyncpg doesn't provide a handle on the
underlying socket. If asyncpg accepts MagicStack/asyncpg#1313, we'll be able to
improve this situation.
Fixes #449.