Skip to content

Metrics & traces

The full catalogue of telemetry Ampora itself emits via OpenTelemetry. Headlines and alerting guidance are on Operations → Self-observability.

Metrics

All metrics live under the ampora_* namespace.

OpAMP

Metric Type Labels Description
ampora_opamp_active_sessions Gauge tenant, instance Currently open WebSocket sessions
ampora_opamp_frames_received_total Counter tenant, frame_kind Inbound frames
ampora_opamp_frames_rejected_total Counter tenant, reason oversize, malformed, cap_mismatch, auth_failed
ampora_opamp_apply_duration_seconds Histogram tenant, agent_type Push → APPLIED wall-clock
ampora_opamp_bootstrap_redemptions_total Counter tenant, outcome First-connect token redemption

Dispatch backplane

Metric Type Labels Description
ampora_dispatch_local_total Counter tenant Same-instance dispatches
ampora_dispatch_forwarded_total Counter tenant, target_instance Cross-instance dispatches
ampora_dispatch_no_session_total Counter tenant Targeted agent had no live session
ampora_dispatch_envelope_age_seconds Histogram tenant Time from publish to consume
ampora_session_ownership_acquires_total Counter outcome Lease acquisition outcome

Live-update bus

Metric Type Labels Description
ampora_live_bus_events_total Counter tenant, event_type, direction Events published / consumed
ampora_live_bus_dropped_total Counter tenant, subscriber Subscriber overflow drops

Governance

Metric Type Labels Description
ampora_policy_evaluations_total Counter tenant, policy, outcome allow or deny
ampora_policy_denied_total Counter tenant, policy Denial-rate per policy
ampora_policy_evaluation_duration_seconds Histogram tenant, policy Per-eval latency
ampora_audit_archived_total Counter tenant Rows moved hot → archive
ampora_audit_purged_total Counter tenant Rows purged from archive

Rollouts

Metric Type Labels Description
ampora_rollout_state_transitions_total Counter tenant, from, to State machine transitions
ampora_rollout_gate_fired_total Counter tenant, gate Per-gate firing rate
ampora_rollout_targets_succeeded_total Counter tenant, rollout_id Per-rollout success counter
ampora_rollout_targets_failed_total Counter tenant, rollout_id Per-rollout failure counter

GitOps

Metric Type Labels Description
ampora_gitops_sync_runs_total Counter tenant, source, outcome Sweep outcomes
ampora_gitops_sync_duration_seconds Histogram tenant, source Per-sweep duration
ampora_gitops_files_imported_total Counter tenant, source Files producing new versions

Federation

Metric Type Labels Description
ampora_federation_calls_total Counter tenant, peer, direction, outcome Per-peer call counters
ampora_federation_call_duration_seconds Histogram tenant, peer, direction Per-call latency

Database

Metric Type Labels Description
ampora_db_query_duration_seconds Histogram tenant, query Per-query duration (top queries labelled)
ampora_db_pool_open_connections Gauge instance Npgsql open connections
ampora_db_pool_busy_connections Gauge instance Npgsql busy connections

PKI

Metric Type Labels Description
ampora_pki_certs_issued_total Counter tenant, kind agent, ocsp, federation
ampora_pki_certs_revoked_total Counter tenant, kind
ampora_pki_signing_duration_seconds Histogram tenant, provider Provider-side signing latency
ampora_pki_crl_publish_duration_seconds Histogram tenant Per-publish duration

Traces

Span names are stable; attributes follow OpenTelemetry semantic conventions where applicable.

Span Notable attributes
opamp.frame_received agent.id, frame.kind, frame.size_bytes
opamp.frame_sent agent.id, frame.kind
opamp.dispatch dispatch.target_instance, dispatch.outcome
opamp.apply_status agent.id, remote_config.status
live_update.publish event.type, tenant
live_update.consume event.type, subscriber
gitops.sync source.id, tip.sha
federation.outbound_call peer.name, endpoint, http.status_code
policy.evaluate policy.name, outcome
rollout.tick rollout.id, state

W3C trace context propagates over the dispatch backplane and the live-update bus, so a single trace can link "operator clicked X" to "agent applied Y" across instances.

Logs

Structured JSON to stdout. Every line includes:

{
  "timestamp": "2026-04-25T14:30:00.123Z",
  "level": "Information",
  "category": "Ampora.Fleet.Rollouts.RolloutService",
  "message": "Rollout {RolloutId} entered state {State}",
  "trace_id": "...",
  "span_id": "...",
  "tenant_id": "...",
  "RolloutId": "...",
  "State": "InProgress"
}

Log levels follow .NET conventions: Trace < Debug < Information < Warning < Error < Critical. Production deployments default to Information.