Use logs, health checks, metrics and distributed traces to investigate a running deployment. Replace the example paths and addresses with those of the service being checked. Keep credentials and private keys out of log excerpts.
Logs
gdsgate writes structured logs to stderr. Stdout is reserved for command data,
such as a proxy-ssh byte stream. Operational failures use ERROR tracing events,
including failures before configuration and telemetry initialization. The default is warn,gdsgate=info:
gdsgate* at INFO and everything else at WARN. Setting RUST_LOG replaces
that default; it does not extend it:
PROXY_CONFIG="<proxy-config>"
CONNECTOR_CONFIG="<connector-config>"
AUTHORITY_CONFIG="<authority-config>"
RUST_LOG=gdsgate_proxy=debug,gdsgate=info,warn gdsgate --config "$PROXY_CONFIG" proxy
RUST_LOG=gdsgate_ssh=trace,gdsgate=info,warn gdsgate --config "$CONNECTOR_CONFIG" connector
RUST_LOG=debug gdsgate --config "$AUTHORITY_CONFIG" authoritySet GDSGATE_LOG_FORMAT=json for one JSON object per line, suitable for
Loki, journald, a container log driver, or SIEM ingestion. Any other value,
including unset, keeps the human-readable format:
AUTHORITY_CONFIG="<authority-config>"
GDSGATE_LOG_FORMAT=json RUST_LOG=gdsgate=info,warn gdsgate --config "$AUTHORITY_CONFIG" authorityWhen profile is configured, JSON lines carry a top-level profile field and
pretty lines carry profile=<value>. Without it, no line carries that field.
The value is stamped on each line, including lines written by background tasks.
Collect stderr with the platform pipeline and keep the profile and timestamp
when comparing services. Redact tokens, private keys, policy documents, and
credential contents before sending a log excerpt to another team.
Metrics and health
Configure [telemetry].metrics_listen on the role being checked. Set
METRICS_ADDR to that role's protected listener, for example 127.0.0.1:9090:
METRICS_ADDR="127.0.0.1:9090"
curl --fail --silent --show-error "http://${METRICS_ADDR}/healthz"
curl --fail --silent --show-error "http://${METRICS_ADDR}/readyz"
curl --fail --silent --show-error "http://${METRICS_ADDR}/metrics"Successful checks return HTTP 200 and exit 0. With --fail, HTTP errors
also produce a non-zero exit, including readiness 503. Unknown paths return
404; methods other than GET return 405. Keep a service out of the load
balancer while it is unready and inspect its logs and dependency checks.
The telemetry listener is plain HTTP and carries no credentials. Bind it to
loopback or a mesh-internal address. Do not expose it to the public internet. It is absent
when metrics_listen is empty. The HTTP surface is operational telemetry only;
the audit log is a separate durable, hash-chained sink.
The endpoints answer different questions:
| Endpoint | Meaning |
|---|---|
/healthz |
The process is serving HTTP. It returns 200 independently of backend availability. |
/readyz |
Startup is complete, the service is not draining, and configured runtime dependency checks pass. A failed or timed-out check returns 503; recovery can restore 200 without restarting. |
/metrics |
Prometheus metrics for this process. A successful scrape does not establish readiness or audit integrity. |
Authority readiness checks the store and, in HA,
the leader lease, fencing and leader route.
Proxy readiness requires a reachable ready
Authority leader. Dependency checks have a two-second deadline. Connector
readiness reports that its service loop has started; it does not prove that a
live tunnel exists. Use the tunnel metrics below for that check. When the file named by
GDSGATE_DRAIN_FILE exists, readiness is withdrawn while liveness remains available.
Proxy also serves gate.v1.Health/Check on its public gRPC listener before
client authentication. Authority has no public gRPC health service. For a TLS
public listener, verify the server certificate:
CA_FILE="<ca.pem>"
PROXY_ADDR="<proxy-host>:<proxy-public-port>"
grpcurl -cacert "$CA_FILE" -d '{}' "$PROXY_ADDR" gate.v1.Health/CheckUse grpcurl -plaintext instead when the public listener is
plaintext. The HTTP probe is the common process check. A Proxy health response
is a separate anonymous public-surface check and does not establish an
Authority control-plane session.
Metric reference
A counter accumulates events during a process lifetime, a gauge reports a current value, and a histogram records a distribution such as latency. Counter resets are expected after restart. Series appear for the roles and features that emit them; an absent series is not a zero measurement.
Use the labels shown below to group results. Process-observation metrics have a separate capture and delivery reference.
| Metric | Type and labels | Meaning |
|---|---|---|
gdsgate_authorize_total |
Counter, action, decision |
Issuance authorization decisions, including allow, deny, and not_served. |
gdsgate_authorize_duration_seconds |
Histogram, action |
Issuance decision latency. |
gdsgate_sessions_total |
Counter, protocol |
Proxy data-plane sessions opened. |
gdsgate_active_sessions |
Gauge, protocol |
Proxy sessions currently open. |
gdsgate_connector_reconnects_total |
Counter | Connector tunnel connection cycles that ended or failed before backoff and redial. |
gdsgate_connector_registrations_refused_total |
Counter | Connector-observed tunnels closed quickly before registration acknowledgement. The Connector cannot label the cause; inspect the Proxy log. |
gdsgate_active_connector_tunnels |
Gauge | Reverse tunnels registered on this Proxy now. |
gdsgate_connector_tunnels_total |
Counter, outcome |
Connector tunnels by registered or refused outcome. |
gdsgate_connector_tunnel_disconnects_total |
Counter, reason |
Tunnel endings: closed, transport_error, keepalive_failed, evicted, superseded, or lease_expired. |
gdsgate_connector_tunnel_duration_seconds |
Histogram | How long a registered reverse tunnel stayed open. |
gdsgate_abandoned_session_notices_total |
Counter, reason |
Tunnel endings that left sessions relaying over them, by the same reason values as gdsgate_connector_tunnel_disconnects_total. A tunnel carrying nothing is counted by neither. |
gdsgate_abandoned_sessions_total |
Counter, outcome |
Session ids the Proxy reported as unaccounted for, by what Authority answered: closed, recorded, unknown, or deferred. |
gdsgate_abandoned_session_notices_dropped_total |
Counter | Departure notices dropped because the Proxy's queue was full. Each one is a set of sessions nothing will report. |
gdsgate_public_anonymous_refused_total |
Counter, rpc |
Public unauthenticated calls refused by the per-IP budget. |
gdsgate_route_misses_total |
Counter, stage, reason |
Requests naming a resource no connected Connector serves; reason is departed or unknown. |
gdsgate_authority_pool_moves_total |
Counter | Times the Proxy moved its Authority calls and relay streams to another instance: after a follower refused, an instance was unreachable, or a probe found the leader elsewhere. |
gdsgate_authority_relay_streams_total |
Counter, outcome |
Reverse-tunnel control-plane streams relayed to Authority: open, refused, dial_failed, or unconfigured. |
gdsgate_active_auth_relay_streams |
Gauge | Reverse-tunnel control-plane streams currently open. |
gdsgate_authority_relay_connections_total |
Counter, lane, outcome |
Public-listener Authority relay connections by renewal or admin lane and open, refused, dial_failed, or unconfigured outcome. |
gdsgate_active_auth_relay_connections |
Gauge, lane |
Public-listener Authority relay connections currently open by lane. |
gdsgate_request_authorize_total |
Counter, kind, decision |
Per-request decisions. kind is the request kind: kube, web, db_connect, connect, or db_query. The Cedar action is in the audit field cedar_action. |
gdsgate_transport_identity_expires_in_seconds |
Gauge, role |
Seconds remaining on a node's own transport leaf, negative after expiry. |
gdsgate_transport_identity_renewals_total |
Counter, role, outcome |
Transport-leaf renewal outcomes ok or failed. |
gdsgate_doctor_check_status |
Gauge, id, category |
Latest periodic doctor severity: 0 ok, 1 info, 2 warn, 3 fail. |
gdsgate_doctor_failed |
Gauge | Failing checks at the last periodic doctor run. |
gdsgate_doctor_warnings |
Gauge | Warning checks at the last periodic doctor run. |
gdsgate_doctor_last_run_timestamp_seconds |
Gauge | Unix time of the last periodic doctor run. |
gdsgate_license_expires_unix |
Gauge | Unix time the license this process runs under expires. Absent when there is no license. |
gdsgate_audit_ingress_duration_seconds |
Histogram, stage |
Authority Connector-audit ingress waits: lock, enqueue, or durable. Durable persistence is awaited outside the shared service lock. |
gdsgate_audit_ingress_events_total |
Counter, outcome |
Events in completed ingress responses: committed or refused. Requests rejected before ingress are excluded. |
gdsgate_audit_pending_events |
Gauge | Events holding writer capacity, including queued and in-flight groups across writer generations. Each Authority shares one 4096-event budget across its writer generations. |
gdsgate_audit_writer_batch_events |
Histogram | Events in a writer transaction attempt, after identical outbox submissions are coalesced. |
gdsgate_audit_writer_duration_seconds |
Histogram, stage |
Time from group enqueue to dequeue (queue), or through commit, retries and completion (commit). |
gdsgate_audit_writer_commits_total |
Counter, outcome |
Writer transaction batches that finished: committed or failed; retries are counted separately. |
gdsgate_audit_writer_retries_total |
Counter | Audit transaction retries after storage failure or a concurrent writer collision. |
gdsgate_audit_verifier_active |
Gauge | Verification passes currently running in this process. A pass uses an isolated reader for file SQLite and PostgreSQL. |
gdsgate_audit_verifier_duration_seconds |
Histogram, stage |
Verification time: snapshot, individual read operations, bounded crypto work, exact reference indexing, or the complete total pass. |
gdsgate_audit_verifier_passes_total |
Counter, outcome |
Completed attempts: verified, unverifiable for declared lost-key spans, integrity_failed, or incomplete for cancellation, output, storage or scratch failures. |
gdsgate_audit_verifier_rows_total |
Counter, source |
Rows observed by verification: chain, anchor, or checkpoint. Repeated passes count the same history again; this is work performed, not a count of unique events. |
gdsgate_audit_verifier_buffered_rows |
Gauge | Chain rows in the current page, at most 128 per pass. This excludes decoded copies, evidence, allocator overhead and the reference cache; use process RSS for total memory. |
gdsgate_audit_verifier_scratch_bytes |
Gauge | Allocated reference-index bytes observed during the current pass. The disposable index is capped at 512 MiB and removed after the pass. |
gdsgate_audit_verifier_last_completed_timestamp_seconds |
Gauge | Unix time of the last complete pass, including a pass with declared lost-key spans. An incomplete attempt does not advance it. |
gdsgate_audit_verifier_last_verified_timestamp_seconds |
Gauge | Unix time of the last complete pass with no lost-key spans. Integrity failures and incomplete attempts do not advance it. |
gdsgate_connector_audit_handoff_duration_seconds |
Histogram | Wait to enqueue a session event locally. A full channel applies backpressure to query forwarding; enqueue does not confirm durability. |
gdsgate_connector_audit_batch_events |
Histogram | Events collected for one shipper batch, before RPC retries. |
gdsgate_connector_audit_rpc_duration_seconds |
Histogram | One audit submission attempt, including failed attempts. |
gdsgate_connector_audit_dropped_events_total |
Counter | Events dropped after the shipper retry budget is exhausted; the drop is also logged. |
gdsgate_audit_receipt_recovery_ready |
Gauge | 1 after this writer generation finishes historical receipt recovery; 0 while pending, running or cancelled. |
gdsgate_audit_receipt_recovery_through, gdsgate_audit_receipt_recovery_target |
Gauges | Last confirmed serial and its fixed scan head; -1 before the first confirmed page or for an empty chain. |
gdsgate_audit_receipt_recovery_rows_total |
Counter, work |
Confirmed page work: read counts chain rows; missing, inserted, existing count reference keys within pages. missing counts insertion candidates; inserted counts actual inserts after conflicts. Retries can read the same rows again. |
gdsgate_audit_receipt_recovery_outcomes_total |
Counter, outcome |
complete, retry, cancelled; none is a chain verification verdict. |
gdsgate_audit_receipt_recovery_duration_seconds |
Histogram | Duration of a completed recovery generation, including retry waits. |
gdsgate_audit_outbox_held_total |
Counter, reason |
Queued audit rows the write leader held: unsigned, unknown_key, forged, or replayed. See queued rows. |
gdsgate_audit_outbox_held |
Gauge | Held rows in audit_outbox at this instance's last watch pass. |
gdsgate_audit_outbox_missing_total |
Counter | Queued audit rows this instance watched that left the queue without reaching the chain. |
gdsgate_policy_version_applied |
Gauge | Authority: the stored authorization-policy version this instance decides by. |
gdsgate_policy_version_stored |
Gauge | Authority: the store's active policy version at the last reload pass, every 10 seconds. Differs from gdsgate_policy_version_applied while the instance is behind; see policy and CA reload. |
gdsgate_ca_bundle_stale |
Gauge, kind |
Authority: 1 while the stored state of CA kind (user_ssh, onward_ssh, host_tls, spiffe, jwt_signing) has changed and this instance could not load it, 0 once loaded. |
gdsgate_connector_proxy_connections_desired |
Gauge | Connector's configured target number of distinct verified Proxies. |
gdsgate_connector_proxy_connections_connected |
Gauge | Registered tunnels to distinct verified Proxies. Compare with the desired count. |
gdsgate_connector_proxy_connections_degraded |
Gauge | 1 while the verified connection count is below the desired count; 0 once satisfied. |
gdsgate_connector_duplicate_proxy_connections_total |
Counter | Connection attempts released because that verified Proxy is already connected. |
gdsgate_authority_forward_requests_total |
Counter | Authority RPC attempts forwarded to the current write leader. |
gdsgate_authority_forward_transport_failures_total |
Counter | Forwarding attempts that failed on the Authority peer connection. |
gdsgate_scope_publishes_total |
Counter, scope, outcome |
Publication snapshots accepted or refused for a resource scope. |
gdsgate_scope_live_rows |
Gauge, scope |
Catalog rows held by a scope after its latest accepted publication. Compare with its configured ceiling. |
gdsgate_scope_leases_expired_total |
Counter | Leased catalog rows removed after their lease was not renewed. |
gdsgate_audit_outbox_depth |
Gauge | Durable queued audit events waiting to be sealed into the chain. |
gdsgate_audit_outbox_oldest_age_secs |
Gauge | Age in seconds of the oldest waiting audit event; 0 when the queue is empty. |
gdsgate_proxy_peer_opens_total |
Counter, side, outcome |
Peer session opens by ingress/egress side and accepted/rejected outcome. See Proxy peering below. |
gdsgate_proxy_peer_transport_total |
Counter, outcome |
Peer transport activity; dial counts physical connection attempts. |
gdsgate_proxy_catalog_phase_seconds |
Histogram, stage |
Time spent checking Authority (authority) or current serving routes (serving). |
gdsgate_session_open_queue_total |
Counter, outcome |
Shared-session admission results: admitted, queue full, or wait expired. |
gdsgate_session_open_queue_wait_seconds |
Histogram | Time admitted shared-session requests spent waiting for opening capacity. |
gdsgate_audit_incremental_verifier_initialized |
Gauge | 1 once a trusted prefix is available for incremental verification. |
gdsgate_audit_incremental_verifier_caught_up |
Gauge | 1 when the latest incremental result has reached its captured chain head. |
gdsgate_audit_incremental_verifier_duration_seconds |
Histogram | Duration of incremental verification attempts. |
gdsgate_audit_incremental_verifier_passes_total |
Counter, outcome |
Incremental results: verified, unverifiable, integrity_failed, or incomplete. |
gdsgate_audit_incremental_verifier_rows_total |
Counter | Records covered by completed incremental passes. |
gdsgate_audit_incremental_verifier_last_completed_timestamp_seconds |
Gauge | Unix time of the latest completed incremental pass, including declared lost-key spans. |
gdsgate_audit_incremental_verifier_last_verified_timestamp_seconds |
Gauge | Unix time of the latest incremental pass completed without lost-key spans. |
The gdsgate_doctor_* gauges appear when periodic doctor checking is enabled
with [doctor].check_interval_secs > 0. A deployment label from profile is
added to every series when configured. Keep scrape and alert labels bounded. Use structured logs for individual
resource, identity and request details.
Alert on a falling gdsgate_transport_identity_expires_in_seconds together
with gdsgate_transport_identity_renewals_total{outcome="failed"}. The
background identity renewal path never falls back to a spent enrollment or
join token. It keeps the old material while retrying and eventually refuses
new handshakes once the leaf is expired.
Connectors on a proxy
Compare Proxy tunnel metrics with the expected Connector fleet, then inspect node health:
gdsgate --config operator.toml authority nodes list --healthA missing health report does not prove that the process is dead. If tunnels are unexpectedly absent or registrations are refused, check Proxy and Connector logs, identity status and resource publication before admitting traffic.
gdsgate_active_connector_tunnels counts reverse tunnels held by a Proxy. It
has no expected value in the exposition because the Proxy has no fleet roster.
Compare it with deployment inventory and the Connector logs. A rising
gdsgate_connector_tunnels_total{outcome="refused"} with a flat active gauge
means registration is arriving and being closed. Common reasons include an
unknown or revoked node, an unreachable Authority, a malformed registration,
resources owned by another peer, or a catalog that permits none of the
Connector's declared resources.
gdsgate_connector_tunnel_disconnects_total distinguishes closed,
transport_error, keepalive_failed, evicted, superseded, and lease_expired. A short
gdsgate_connector_tunnel_duration_seconds distribution indicates flapping,
but the Proxy cannot distinguish a powered-off host from a middlebox under
transport_error. The per-Connector fingerprint, node id, and declared label
appear in logs. They are not metric labels.
Proxy peering metrics
Experimental Proxy peering exposes gdsgate_proxy_peer_opens_total with
side="ingress" or side="egress" and outcome="accepted" or outcome="rejected".
Accepted opens count backend admission; rejected opens reached the peer-open
path and failed admission or transport. On egress, refusals before a peer supplies its
first frame are excluded. The active-session gauge remains local to each Proxy,
so a relayed session occupies a slot on both participating nodes.
Rc.12 reuses authenticated peer transports while checking live
ownership and session admission on each open. gdsgate_proxy_peer_transport_total
with outcome="dial" counts physical connection attempts.
gdsgate_proxy_catalog_phase_seconds separates stage="authority" from
stage="serving"; the latter covers current route availability checks.
These metrics carry no resource or user labels.
Distributed tracing (OpenTelemetry)
Set [telemetry].otel_endpoint to the collector's OTLP/HTTP endpoint, such as
http://otel-collector:4318, and restart the service. Confirm that the collector
receives spans with the expected service name and request correlation.
Keep the destination private and apply the deployment's trace retention policy. If export fails or sends unexpected sensitive values, unset the endpoint or restore its previous value and restart. Already exported traces remain subject to the collector's retention policy.
Tracing is optional and outbound. It dials the collector's OTLP/HTTP receiver,
commonly port 4318; it does not bind that port. The W3C traceparent header
is propagated over gRPC seams between Proxy, Authority, and Connector.
Long-running authority, proxy, connector, and explicit all services export;
one-shot CLI commands do not. Spans may carry service.name, profile,
action, resource, decision, and session_uid where those fields apply.
Exporter construction validates the endpoint during startup, but successful construction is not proof of later delivery. Confirm receipt at the collector and use its transport diagnostics when spans stop arriving.
Trace export uses OTLP/HTTP, so keep it on a loopback or mesh-internal path. Traces carry operational metadata and never secrets, full request bodies, or audit-chain material. The data-plane byte relay inside an established tunnel is not traced per message.