Operations

Metrics and observability

Prometheus metrics, structured logs, and the dashboards telark emits.

telark is designed to be observable from outside. Every service emits Prometheus metrics on a /metrics endpoint, writes structured JSON logs to stdout, and exposes liveness / readiness probes (see Operations → Health checks).

Endpoints

ServiceMetrics endpointNotes
discovery-service/metrics on the configured HTTP portCycle, leader, force-sync, plan controller, rollback controller.
exporter-service/metricsCRD writes, notification dispatch, snapshot writes, PVC consumption.
auth-service/metricsSession create / refresh / cleanup, passkey enrolment, OIDC exchange.

Every endpoint is unauthenticated by design — scrape from Prometheus pods running inside the same cluster, gated by NetworkPolicy.

What each service exports

The exact metric names follow telark_<service>_<unit> for counters / histograms and telark_<service>_<state> for gauges. The most useful ones, by service:

discovery-service

MetricTypeMeaning
telark_discovery_cycle_duration_secondshistogramEnd-to-end cycle latency (leader-only).
telark_discovery_cycle_changes_totalcounterPer-class change counter. Label: class.
telark_discovery_leader_is_electedgauge1 on the leader, 0 on followers.
telark_discovery_forcesync_inflightgaugeForce-sync markers picked up but not yet finished.
telark_discovery_redis_errors_totalcounterRedis call failures (any type).
telark_discovery_plan_tick_duration_secondshistogramController tick latency for protection plans.
telark_discovery_plan_health_totalcounterHealth resolutions. Label: result (healthy/drifted/degraded/unknown).
telark_discovery_rollback_inflightgaugeRollbacks currently being applied.
telark_discovery_rollback_result_totalcounterFinal rollback statuses. Label: result (success/failed).

exporter-service

MetricTypeMeaning
telark_exporter_crd_writes_totalcounterResource writes. Labels: kind, op.
telark_exporter_notification_emitted_totalcounterNotifications successfully dispatched. Label: type.
telark_exporter_snapshot_writes_totalcounterSnapshots persisted to the PVC.
telark_exporter_snapshot_prune_totalcounterSnapshots removed by retention pruning.
telark_exporter_pvc_bytes_usedgaugeAggregate PVC consumption for snapshots.
telark_exporter_pvc_snapshot_countgaugeTotal snapshots on the PVC.

auth-service

MetricTypeMeaning
telark_auth_session_activegaugeLive (non-expired) sessions.
telark_auth_session_created_totalcounterSessions opened. Label: method (passkey/oidc).
telark_auth_session_expired_totalcounterSessions reaped by the cleanup controller.
telark_auth_passkey_registered_totalcounterPasskey enrolments.
telark_auth_oidc_exchange_totalcounterOIDC code-for-token exchanges. Label: provider, result.
telark_auth_permission_resolve_duration_secondshistogramLatency of /auth/authorisation/permissions.

Logs

All three services log JSON to stdout. Common fields:

FieldNotes
tsRFC3339 UTC timestamp.
leveldebug / info / warn / error.
msgShort human label.
serviceOne of discovery, exporter, auth.
componentSub-package (e.g. rollback, plan-controller, passkey).
request_idPer-request correlation ID where applicable.
user_idWhen the request was authenticated.
resource_idWhen the operation targeted a telark resource.
errError string (only on error and warn).

Log shape is stable enough to grep on. A typical operator query:

kubectl logs deploy/telark-discovery -c discovery |
  jq 'select(.component=="rollback" and .level=="error")'

Dashboards

The release-manager Helm chart ships an optional Grafana set covering the most common views:

  • Discovery overview — cycle latency, change rate, leader state, force-sync lag.
  • Plan health — per-plan health distribution, drift rate, controller tick duration.
  • Rollback — inflight rollbacks, success vs failure rate, per-rollback timing.
  • Exporter storage — PVC consumption, snapshot count, prune rate.
  • Auth — session create / expire, OIDC outcomes, permission resolve latency.

The dashboards are JSON ConfigMaps; install with the chart's dashboards.enabled=true flag (see Helm values reference once the public install path lands).

Alerts

telark ships no opinionated alert rules — alerting is your team's prerogative. A reasonable starter set:

  • telark_discovery_redis_errors_total rate > 0 over 5 minutes.
  • telark_discovery_leader_is_elected sum across replicas ≠ 1.
  • telark_discovery_rollback_result_total{result="failed"} rate

    0.

  • telark_exporter_pvc_bytes_used / pvc_capacity > 80%.

Tracing

OpenTelemetry tracing is not wired today. The structured logs carry request_id so you can correlate across services manually if needed.