Skip to content

client/daemon: add doublezero_connection_info Prometheus metric#3201

Draft
snormore wants to merge 2 commits intomainfrom
snor/client-metrics-connection-info
Draft

client/daemon: add doublezero_connection_info Prometheus metric#3201
snormore wants to merge 2 commits intomainfrom
snor/client-metrics-connection-info

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Mar 9, 2026

Summary

  • Add a doublezero_connection_info info-style gauge metric exposing connection metadata (user_type, network, current_device, metro, tunnel_name, tunnel_src, tunnel_dst) matching data available via doublezero status --json
  • Metric is updated after each reconcile cycle, manual provision/remove, and reset on reconciler teardown
  • Uses the standard Prometheus info-metric pattern (GaugeVec set to 1 with metadata labels), keeping doublezero_session_is_up unchanged as a plain gauge

Closes #2168

Testing Verification

  • TestConnectionInfoMetric verifies the metric is populated with correct labels after reconcile and cleared after teardown

snormore added 2 commits March 8, 2026 20:07
Add an info-style gauge metric that exposes connection metadata
(user_type, network, current_device, metro, tunnel_name, tunnel_src,
tunnel_dst) matching the data available via `doublezero status --json`.

The metric is updated after each reconcile cycle, manual provision, and
manual remove, and reset on reconciler teardown.

Closes #2168
@snormore snormore force-pushed the snor/client-metrics-connection-info branch from b8ae1b5 to b7d3e62 Compare March 9, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client/metrics: Expose connection metadata in native Prometheus metrics

1 participant