feat: add Prometheus metrics to NATS pubsub for parity with PGPubsub (#26441)

This commit is contained in:
Jon Ayers
2026-06-23 11:59:48 -05:00
committed by GitHub
parent d104d0dcb3
commit 6da322d59f
9 changed files with 613 additions and 10 deletions
+13
View File
@@ -160,6 +160,19 @@ deployment. They will always be available from the agent.
| `coder_derp_server_sent_pong_total` | counter | Total pongs sent. | |
| `coder_derp_server_unknown_frames_total` | counter | Total unknown frames received. | |
| `coder_derp_server_watchers` | gauge | Current watchers. | |
| `coder_nats_pubsub_connected` | gauge | Whether we are connected (1) or not connected (0) to nats | |
| `coder_nats_pubsub_current_events` | gauge | The current number of pubsub event channels listened for | |
| `coder_nats_pubsub_current_subscribers` | gauge | The current number of active pubsub subscribers | |
| `coder_nats_pubsub_disconnections_total` | counter | Total number of times we disconnected unexpectedly from nats | |
| `coder_nats_pubsub_latency_measure_errs_total` | counter | The number of pubsub latency measurement failures | |
| `coder_nats_pubsub_latency_measures_total` | counter | The number of pubsub latency measurements | |
| `coder_nats_pubsub_messages_total` | counter | Total number of messages received from nats | `size` |
| `coder_nats_pubsub_published_bytes_total` | counter | Total number of bytes successfully published across all publishes | |
| `coder_nats_pubsub_publishes_total` | counter | Total number of calls to Publish | `success` |
| `coder_nats_pubsub_receive_latency_seconds` | gauge | The time taken to receive a message from a pubsub event channel | |
| `coder_nats_pubsub_received_bytes_total` | counter | Total number of bytes received across all messages | |
| `coder_nats_pubsub_send_latency_seconds` | gauge | The time taken to send a message into a pubsub event channel | |
| `coder_nats_pubsub_subscribes_total` | counter | Total number of calls to Subscribe/SubscribeWithErr | `success` |
| `coder_pubsub_connected` | gauge | Whether we are connected (1) or not connected (0) to postgres | |
| `coder_pubsub_current_events` | gauge | The current number of pubsub event channels listened for | |
| `coder_pubsub_current_subscribers` | gauge | The current number of active pubsub subscribers | |