Metrics reference

The Prometheus metrics the DefenseClaw gateway exports, with their types, units and labels, as the bundled Grafana dashboards query them.

This page lists the metrics the gateway exports over OTLP and the names they get in Prometheus, so you can build your own panels and alerts. The Grafana dashboard catalog shows which board uses which metric. Model cost and token metrics are explained in more depth in Tokenomics.

How names and labels map

  • A dot in a metric name becomes an underscore: defenseclaw.queue.depth is defenseclaw_queue_depth.
  • Prometheus adds the unit to the name when there is one: _milliseconds, _seconds, _bytes, _nanoseconds, and _ratio for a gauge whose unit is a plain number. A unit that only counts things, such as {hook}, adds nothing.
  • A counter ends in _total. A histogram has _bucket, _sum and _count series.
  • An up/down counter shows as a gauge.
  • Labels are the short names the bundled dashboards filter on (connector, scanner, rule_id, severity). The gateway's own Prometheus endpoint and an OTLP destination named local-observability use them. An OTLP destination with any other name exports longer canonical label names. See Run Grafana locally.
  • Sandbox names, request IDs, session IDs and people are never metric labels.
  • A metric appears in Prometheus only after the gateway has recorded something for it, so a quiet system shows fewer series than this page lists. A metric listed with no labels exports none on the short-label destination.

AI discovery

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_ai_components_installsgaugeinstallecosystem, nameDistinct install evidences per component as of the last scan.
defenseclaw_ai_components_observations_totalcounterobservationecosystem, identity_band, name, presence_bandConfidence results per component; one count for each scan that produced a result for it.
defenseclaw_ai_components_workspacesgaugeworkspaceecosystem, nameDistinct workspaces a component appears in as of the last scan.
defenseclaw_ai_confidence_identity_scorehistogramnoneecosystem, framework, nameIdentity confidence score in [0,1] per component, per scan.
defenseclaw_ai_confidence_presence_scorehistogramnoneecosystem, framework, namePresence confidence score in [0,1] per component, per scan.
defenseclaw_ai_discovery_active_signalsgaugesignalprivacy_mode, sourceLatest active AI usage signal count.
defenseclaw_ai_discovery_dedupe_suppressed_totalcountersignalprivacy_mode, result, sourceDuplicate AI discovery signals suppressed within a scan.
defenseclaw_ai_discovery_duration_millisecondshistogrammsprivacy_mode, result, sourceWall-clock duration of continuous AI discovery scans.
defenseclaw_ai_discovery_errors_totalcountererrordetector, reasonContinuous AI discovery detector errors by bounded detector/reason.
defenseclaw_ai_discovery_files_scanned_totalcounterfileprivacy_mode, result, sourcePackage manifest and shell history files inspected by continuous AI discovery.
defenseclaw_ai_discovery_gone_signals_totalcountersignalai_product, ai_vendor, confidence, detector, privacy_mode, result, signal_category, source, stateAI usage signals that disappeared from a full scan.
defenseclaw_ai_discovery_new_signals_totalcountersignalai_product, ai_vendor, confidence, detector, privacy_mode, result, signal_category, source, stateNew or changed AI usage signals discovered.
defenseclaw_ai_discovery_runs_totalcounterrunprivacy_mode, result, sourceContinuous AI discovery scans completed by the gateway.
defenseclaw_ai_discovery_signals_totalcountersignalai_product, ai_vendor, confidence, detector, signal_category, stateAI usage signals observed by category/vendor/product/state.

Admission

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_admission_decisions_totalcounterdecisiondecision, source, target_typeAdmission gate decisions

Agent Substrate

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_substrate_first_hook_after_resume_millisecondshistogrammsnoneTime the first hook call takes after an actor resumes; no identity labels.
defenseclaw_substrate_hook_rtt_millisecondshistogrammsnoneHook call time measured by the gateway, from request received to response written; recorded only by the gateway, never by the actor kit; no identity labels.
defenseclaw_substrate_idle_suspends_totalcountersuspendnoneActors suspended by DefenseClaw for being idle; no identity labels.
defenseclaw_substrate_leader_observe_latency_millisecondshistogrammsnoneTime a stateless gateway waits for the leader to record a stateful observation; no identity labels.
defenseclaw_substrate_policy_conflicts_totalcounterconflictnoneActors the controller marked policy_conflict after three reverts in ten minutes of a foreign egress policy change; no identity labels.
defenseclaw_substrate_policy_lag_secondshistogramsnoneTime from a policy or profile change to the egress policy being active on Agent Substrate; no identity labels.
defenseclaw_substrate_rate_limited_totalcounterrequestnoneCalls refused by the per-actor or per-atespace fair-share limit, counted in total; no identity labels.
defenseclaw_substrate_unattested_templatesgaugetemplatenoneAgent Substrate templates DefenseClaw has seen without a valid attestation; no identity labels.

Agents

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_agent_discovery_duration_millisecondshistogrammscache_hit, result, sourceWall-clock duration of the CLI local agent discovery scan.
defenseclaw_agent_discovery_errors_totalcountererrorconnector, reasonVersion probe or discovery errors by connector and bounded reason.
defenseclaw_agent_discovery_installed_ratiogaugenoneconnectorLatest discovered installed state for each connector (1 installed, 0 not installed).
defenseclaw_agent_discovery_runs_totalcounterruncache_hit, result, sourceOn-demand local agent discovery reports accepted by the gateway, by source/cache/result.
defenseclaw_agent_discovery_signals_totalcountersignalconnector, has_binary, has_config, installed, probe_statusPer-connector install signals reported by agent discovery.
defenseclaw_agent_last_seen_secondsgaugesconnector, gen_ai_agent_typeUnix seconds when an agent lifecycle transition was last observed.
defenseclaw_agent_lifecycle_transitions_totalcountertransitionconnector, gen_ai_agent_typeAgent lifecycle transitions by stable identity, execution, event, and state.
defenseclaw_agent_phase_current_ratiogaugenoneconnectorCurrent execution phase encoded as a stable integer for state timelines.
defenseclaw_agent_phase_transitions_totalcountertransitionconnectorDirected execution phase transitions by stable agent identity and execution.
defenseclaw_agent_reported_cost_USDgaugeUSDconnectorLatest upstream-reported cumulative agent cost in USD; absent when the connector does not report cost.
defenseclaw_agent_token_usage_totalcountertokenconnector, kindConnector-reported input and output tokens attributed to an agent tree.

Alert

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_alert_count_totalcounteralertalert_severity, alert_source, alert_type, connectorTotal runtime alerts emitted

Approval

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_approval_count_totalcounterrequestauto, dangerous, resultExec approval requests processed
defenseclaw_approval_lifecycle_totalcountereventresult, surface, connectorApproval lifecycle events processed across interactive surfaces

Audit events and sinks

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_audit_db_errors_totalcountererroroperationSQLite audit store operation failures
defenseclaw_audit_events_totalcountereventaction, connector, severityTotal audit events persisted
defenseclaw_audit_sink_batches_delivered_totalcounterbatchkind, retry_count, sink, status_codeAudit sink batches acknowledged by remote
defenseclaw_audit_sink_batches_dropped_totalcounterbatchkind, retry_count, sink, status_codeAudit sink batches dropped due to queue or circuit breaker
defenseclaw_audit_sink_circuit_state_ratioup/down counternonesink_kind, sink_nameAudit sink circuit breaker state (0=closed, 1=open, 2=half-open)
defenseclaw_audit_sink_delivery_latency_millisecondshistogrammskind, retry_count, sink, status_codeAudit sink per-batch delivery latency
defenseclaw_audit_sink_failures_totalcounterfailuresink_kind, sink_name, sink_reasonAudit sink send failures by sink kind
defenseclaw_audit_sink_queue_depthup/down countereventsink_kind, sink_nameAudit sink in-memory queue depth

Cisco

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_cisco_errors_totalcountererrorcodeCisco AI Defense inspect errors by code

Cisco inspect

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_cisco_inspect_latency_millisecondshistogrammsoutcomeCisco AI Defense HTTP inspect round-trip latency

Codex

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_codex_notify_totalcountereventresult, status, typeCodex notify events received via the notify-bridge shim, labelled by type/status
defenseclaw_codex_notify_malformed_totalcountereventtypeCodex notify payloads that failed to parse

Config

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_config_load_errors_totalcountererrorerror_typeConfiguration load or validation errors

Egress

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_egress_events_totalcountereventbranch, decision, source, connectorEgress requests classified by Layer 1 shape detection (branch=known|shape|passthrough)

Gateway

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_gateway_errors_totalcountererrorerror_code, error_subsystemStructured gateway errors by subsystem/code
defenseclaw_gateway_events_emitted_totalcountereventevent_type, severityGateway events written through the writer choke point
defenseclaw_gateway_forwarded_headers_totalcounterheaderpath, resultInbound HTTP headers forwarded from the agent to the upstream LLM provider (path=chat-completions|passthrough, result=ok|rejected_invalid|rejected_overflow)
defenseclaw_gateway_judge_errors_totalcountererrorjudge_kind, judge_reasonLLM judge errors (provider, parse, or empty response)
defenseclaw_gateway_judge_invocations_totalcounterinvocationjudge_action, judge_kind, judge_severityLLM judge invocations by kind/action
defenseclaw_gateway_judge_latency_millisecondshistogrammsjudge_kindLLM judge invocation latency
defenseclaw_gateway_verdicts_totalcounterverdictdestination_app, policy_id, verdict_action, verdict_severity, verdict_stageGuardrail verdicts emitted per stage/action/severity

Gateway HTTP

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_http_auth_failures_totalcounterfailurereasonHTTP authentication failures by route + reason
defenseclaw_http_rate_limit_breaches_totalcounterbreachclient_kindHTTP rate limit breaches by route
defenseclaw_http_request_count_totalcounterrequesthttp_method, http_status_codeTotal HTTP requests to the gateway API
defenseclaw_http_request_duration_millisecondshistogrammshttp_method, http_status_codeHTTP request duration distribution

Gateway runtime

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_runtime_fd_in_usegaugefdnoneFile descriptors currently held by the gateway
defenseclaw_runtime_gc_pause_nanosecondshistogramnsnoneGo GC pause sample (P99 of recent pauses per tick)
defenseclaw_runtime_goroutinesgaugegoroutinenoneCurrent goroutine count
defenseclaw_runtime_heap_alloc_bytesgaugeBynoneCurrent heap allocation in bytes
defenseclaw_runtime_heap_objectsgaugeobjectnoneLive heap objects (runtime.MemStats.HeapObjects)

Guardrail

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_guardrail_evaluations_totalcounterevaluationguardrail_action_taken, guardrail_connector, guardrail_scannerTotal guardrail evaluations performed
defenseclaw_guardrail_judge_fallbacks_totalcounterfallbackguardrail_connector, reasonHook checks the rules decided because the LLM judge timed out, failed, was late for the answer, was at capacity or had no budget left
defenseclaw_guardrail_judge_latency_millisecondshistogrammsjudge_kindLLM judge invocation latency (cache miss path includes model round-trip)
defenseclaw_guardrail_latency_millisecondshistogrammsguardrail_connector, guardrail_scannerGuardrail evaluation latency distribution
defenseclaw_guardrail_parser_uncertainty_totalcounteruncertaintyguardrail_connectorTrusted-action argument or parser uncertainty encountered during projection

Hook

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_hook_deadline_outcomes_totalcountercalloutcomeHook calls that ran out of their answer budget: deadline_deny (the hook blocked the call), late_allow (the call ran unchecked after the budget), shed (refused by the admission limits)

Hook connectors

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_connector_hook_invocations_totalcounterhookconnector, event_type, reason, resultConnector hook invocations observed by the gateway.
defenseclaw_connector_hook_latency_millisecondshistogrammsconnector, event_type, reason, resultConnector hook handler latency.
defenseclaw_connector_hook_outcome_totalcounterdecisionaction, connector, event_type, severity, would_blockConnector hook outcomes labelled by action, severity, and would_block.
defenseclaw_connector_hook_tokens_totalcountertokenconnector, kind, modelToken usage attributable to connector hook invocations. Split by kind=prompt|completion|total.
defenseclaw_connector_hook_unified_dispatch_totalcounterinvocationconnectorCount of hook invocations routed through the unified hook collector, by connector.

Inspection

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_inspect_evaluations_totalcounterevaluationaction, connector, severity, toolTool/message inspect evaluations
defenseclaw_inspect_latency_millisecondshistogrammsconnector, toolTool/message inspect latency distribution

Inventory

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_inventory_ide_pluginsgaugeplugindefenseclaw_ide_product, defenseclaw_ide_plugin_ai, defenseclaw_ide_plugin_enabledIDE extensions and plugins installed as of the last inventory scan, per IDE product, AI flag and enabled state.
defenseclaw_inventory_mcp_tool_events_totalcountereventnoneMCP tool listing and inventory export attempts by bounded stage, outcome, and reason.

Judge

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_judge_persist_batch_sizehistogramrownoneRows committed per judge-persistence transaction
defenseclaw_judge_persist_drops_totalcounterdropreasonJudge bodies dropped before persistence (queue full)
defenseclaw_judge_persist_queue_depthgaugeitemnoneCurrent depth of the async judge-persistence queue

Kernel

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_kernel_events_totalcountereventowner, outcome, controlKernel events of Tetragon policies the gateway recorded, by policy owner, outcome and control.
defenseclaw_kernel_stategaugehosthelper_mode, approval, paused, backend, tetragon_installedThe kernel controls' state on this host, one series per state (value 1), every cycle.

Llm bridge

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_llm_bridge_latency_millisecondshistogrammsstatusLiteLLM bridge call latency (Python subprocess)

Local database

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_sqlite_busy_retries_totalcountereventoperationSQLite SQLITE_BUSY events by operation
defenseclaw_sqlite_checkpoint_duration_millisecondshistogrammsnoneSQLite PRAGMA wal_checkpoint(PASSIVE) duration
defenseclaw_sqlite_db_bytesgaugeBynoneSQLite main database file size
defenseclaw_sqlite_freelist_countgaugepagenoneSQLite PRAGMA freelist_count
defenseclaw_sqlite_page_countgaugepagenoneSQLite PRAGMA page_count
defenseclaw_sqlite_wal_bytesgaugeBynoneSQLite WAL file size

Managed aid

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_managed_aid_fail_open_decisions_totalcounterdecisionreasonManaged AI Defense inspections that allowed because inspection was unwired, unavailable, had no content, or returned an unknown fail-open reason

Model calls (gen_ai)

Prometheus nameTypeUnitLabelsWhat it records
gen_ai_client_operation_duration_secondshistogramsnoneGenAI operation duration.
gen_ai_client_token_usagehistogramtokennoneNumber of input and output tokens used.

Model cost and tokens

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_model_cost_USD_totalcounterUSDconnector, provider, model, route_decision, call_role, profileUSD cost of model calls; calls with no known cost add nothing
defenseclaw_model_cost_baseline_USD_totalcounterUSDconnector, provider, model, route_decision, call_role, profileUSD the same calls would have cost on the model the client asked for; a call is counted only when both that price and its own cost are known
defenseclaw_model_cost_compared_USD_totalcounterUSDconnector, provider, model, route_decision, call_role, profileUSD actually spent on the calls that also count in defenseclaw.model.cost.baseline, so the two compare like for like
defenseclaw_model_tokens_totalcountertokenconnector, provider, model, route_decision, call_role, profile, kindDisjoint token counts of model calls by kind (input uncached, cache_read, cache_creation, output without reasoning, reasoning)
defenseclaw_tokenomics_dropped_totalcounterrecordnoneUsage records lost before they were counted: the bounded queue was full, or the local store reached its bucket or row cap

Operator activity

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_activity_diff_entrieshistogramentryaction, actor, target_typeNumber of changes in each recorded operator change
defenseclaw_activity_totalcounteractivityaction, actor, target_typeOperator mutations recorded

Otel

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_otel_ingest_bytes_totalcounterByconnector, signal, sourceTotal OTLP body bytes received by the connector ingest receiver, by signal/source
defenseclaw_otel_ingest_last_seen_ts_secondsgaugesconnector, signal, sourceUnix-seconds timestamp of the most recent OTLP-HTTP batch accepted from a given source/signal. Used by the ConnectorTelemetrySilent alert.
defenseclaw_otel_ingest_malformed_totalcounterrequestconnector, signal, sourceOTLP-JSON bodies that failed to parse, by signal/source
defenseclaw_otel_ingest_records_totalcounterrecordconnector, signal, sourceLeaf records (logRecords|dataPoints|spans) extracted from inbound OTLP-JSON batches by signal/source
defenseclaw_otel_ingest_requests_totalcounterrequestconnector, result, signal, sourceOTLP-HTTP requests accepted by the connector ingest receiver, by signal/source/result

Panics

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_panics_totalcounterpanicsubsystemRecovered panics by subsystem

Policy

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_policy_bundle_applies_totalcounterapplybundle_result, bundle_error_codeSigned policy bundle receipts that ended confirmed or failed, by result and error code.
defenseclaw_policy_bundle_versiongaugeversionnoneVersion of the signed policy bundle the standalone managed device enforces.
defenseclaw_policy_evaluations_totalcounterevaluationpolicy_domain, policy_verdictTotal OPA policy evaluations per domain
defenseclaw_policy_latency_millisecondshistogrammspolicy_domainOPA policy evaluation latency distribution
defenseclaw_policy_reloads_totalcounterreloadpolicy_statusTotal OPA policy reload events

Process

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_process_uptime_secondsgaugesnoneSidecar process uptime

Provenance

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_provenance_bumps_totalcounterbumpreasonMonotonic provenance generation bumps

Quarantine

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_quarantine_actions_totalcounteractionquarantine_op, quarantine_resultFilesystem quarantine and restore operations

Queues

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_queue_depthgaugeitemcapacity, queueCurrent depth of a buffered queue
defenseclaw_queue_drops_totalcounterdropqueue, reasonEvents dropped due to full queue or backpressure
defenseclaw_queue_oldest_age_millisecondsgaugemsqueueAge of the oldest queued write

Redaction

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_redaction_applied_totalcounterredactiondetector, fieldGuardrail/egress redactions applied by detector/field

Routing

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_budget_limit_USDgaugeUSDbudget_id, scope, periodLimit of one routing budget in USD
defenseclaw_budget_peak_subject_spend_USDgaugeUSDbudget_id, scope, periodHighest single-subject spend of one routing budget in the current window
defenseclaw_budget_spend_USDgaugeUSDbudget_id, scope, periodSpend of one routing budget in the current window (every subject added); absent while the budget spend is still loading
defenseclaw_budget_store_healthygaugestatenone1 when the last sync with the fleet budget store worked, 0 when it or the last push failed
defenseclaw_budget_store_sync_age_secondsgaugesnoneSeconds since this device last read the fleet budget store
defenseclaw_budget_subjects_exceededgaugesubjectbudget_id, scope, periodSubjects of one routing budget at or over its limit in the current window
defenseclaw_semantic_routing_decision_totalcounterdecisionresult, error_code, decision, connector, route_source, route_category, filtered_by, listener, deny_reason, budget_idPer-request semantic routing decision (result=applied|fallback|denied, error.code=closed failure class, decision=override|default, plus the route source, category, filter, listener, refusal class and budget id)
defenseclaw_semantic_routing_latency_millisecondshistogrammsresult, error_codeSemantic routing classification latency in milliseconds

Sandboxes

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_sandbox_activegaugesandboxconnectorSandboxes currently provisioning, starting, ready, or stopping, per harness connector.
defenseclaw_sandbox_managed_asks_totalcounteraskresult, reason, profile, driver, connectorManaged sandbox asks decided by the gateway, by result, reason, guardrail profile, driver and harness connector; no user or sandbox label.
defenseclaw_sandbox_managed_drift_totalcounterdriftfield, profile, driver, connectorOpenShell settings drift found on a managed sandbox, by setting, guardrail profile, driver and harness connector; no user or sandbox label.
defenseclaw_sandbox_managed_foreign_items_totalcounteritemkind, action, profile, driver, connectorForeign sandboxes, containers and network rules found on a managed host, by kind, action, guardrail profile, driver and harness connector; no user or sandbox label.
defenseclaw_sandbox_managed_provisional_totalcounterresolutionresult, profile, driver, connectorProvisional managed sandbox resolutions (registered on the offline floor, or resolved once the directory lookup answered), by result, guardrail profile, driver and harness connector; no user or sandbox label.
defenseclaw_sandbox_managed_refusals_totalcounterrefusalreason, profile, driver, connectorManaged sandbox refusals (host run refused, sandbox unavailable, access refused) by reason, guardrail profile, driver and harness connector; no user or sandbox label.
defenseclaw_sandbox_transitions_totalcountertransitionconnectorSandbox lifecycle phase transitions by harness connector and phase pair.

Scanner

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_scanner_queue_depthup/down counterscanscannerPending scanner jobs queued ahead of execution

Scans

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_scan_count_totalcounterscanscanner, target_type, verdictTotal number of scans completed
defenseclaw_scan_duration_millisecondshistogrammsscanner, target_typeScan duration distribution
defenseclaw_scan_errors_totalcountererrorerror_type, scanner, target_typeScanner invocations that failed (crash, timeout, not found)
defenseclaw_scan_findings_totalcounterfindingconnector, scanner, severity, target_typeTotal findings across all scans
defenseclaw_scan_findings_by_rule_totalcounterfindingconnector, rule_id, scanner, severityFindings grouped by scanner + rule_id + severity
defenseclaw_scan_findings_gaugeup/down counterfindingseverity, target_typeCurrent open finding count

Schema

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_schema_violations_totalcountereventcode, event_typeGateway events dropped by the runtime JSON-schema gate

Slo

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_slo_block_latency_millisecondshistogrammstarget_typeAdmission-block enforcement latency (SLO target: < 2000ms)
defenseclaw_slo_tui_refresh_millisecondshistogrammspanelTUI panel refresh latency (SLO target: < 5000ms)

Stream

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_stream_bytes_sent_byteshistogramByoutcomeBytes sent on an SSE/stream before close
defenseclaw_stream_duration_ms_millisecondshistogrammsoutcomeWall-clock duration of an SSE/stream from open to close
defenseclaw_stream_lifecycle_totalcountertransitionoutcome, transitionSSE/stream lifecycle transitions (open/close) per route/outcome

Telemetry exporter

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_telemetry_destination_exports_totalcounterspandestination, outcome, signalSpans attempted, delivered, rejected, or failed by a named OTLP destination
defenseclaw_telemetry_destination_spans_totalcounterspandestination, outcome, reasonSpans accepted or dropped by a named telemetry destination profile
defenseclaw_telemetry_exporter_errors_totalcountererrorexporter, reason, signalOTel exporter or SDK errors by signal
defenseclaw_telemetry_exporter_last_export_ts_secondsgaugesexporter, signalUnix seconds of last successful metric export

Tool calls

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_tool_calls_totalcountercalldangerous, tool_providerTotal tool calls observed
defenseclaw_tool_duration_millisecondshistogrammstool_providerTool call duration distribution
defenseclaw_tool_errors_totalcountererrorexit_codeTool calls that returned non-zero exit codes

Tui

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_tui_filter_applied_totalcounterfilterfilter_type, panelTUI panel filter applications (operator changed a filter chip or search)

Watcher

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_watcher_errors_totalcountererrornoneFilesystem watcher errors
defenseclaw_watcher_events_totalcountereventconnector, event_type, target_typeFilesystem watcher events observed
defenseclaw_watcher_restarts_totalcounterrestartnoneWatcher or gateway reconnection events

Webhook

Prometheus nameTypeUnitLabelsWhat it records
defenseclaw_webhook_circuit_breaker_totalcountertransitionstate, webhook_target_hashWebhook circuit breaker open/close transitions
defenseclaw_webhook_cooldown_suppressed_totalcountereventwebhook_kindWebhook dispatches suppressed by per-endpoint cooldown
defenseclaw_webhook_dispatches_totalcounterdispatchoutcome, webhook_kindWebhook dispatches attempted by webhook kind
defenseclaw_webhook_failures_totalcounterfailureoutcome, webhook_kindWebhook dispatch failures by webhook kind + reason
defenseclaw_webhook_latency_millisecondshistogrammshttp_status_code, webhook_kind, webhook_target_hashWebhook dispatch latency distribution

Agent span metrics

The local collector also turns agent spans into metrics: defenseclaw_agent_span_calls_total counts spans, and defenseclaw_agent_span_duration_milliseconds (with _bucket, _sum and _count) records how long they took. Their labels follow the span attributes, for example the connector and the operation name. They exist where the collector is set up this way, as in the local Grafana stack.