You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date: 2026-03-03 · See ADR-004 for the decision rationale behind this stack.
1. Principles
No PII in telemetry. User IDs in spans and metrics are SHA-256 hashes. Raw text never
appears in trace attributes, metric labels, or log fields.
Every request produces a trace. No sampling in development. In production, sample at
100 % for error traces, 10 % for success traces (head-based sampling at OTLP Collector).
Logs and traces are correlated. Every log record contains trace_id and span_id
from the active OpenTelemetry context.
Tenant visibility is isolated. Grafana dashboards group by tenant_hash. A
tenant admin sees only their own data.
Alerting is actionable. Every alert maps to a specific runbook or remediation step.
No alert without a clear owner and SLA.
2. Metrics to Collect
2.1 Request metrics
Metric
Type
Labels
Description
gdev_requests_total
Counter
status, category, urgency, tenant_hash
All webhook requests by outcome
gdev_request_duration_seconds
Histogram
endpoint, tenant_hash
End-to-end request latency
gdev_pending_total
Counter
tenant_hash
Actions that required human approval
gdev_approved_total
Counter
tenant_hash
Actions approved by humans
gdev_rejected_total
Counter
tenant_hash
Actions rejected by humans
gdev_approval_queue_depth
Gauge
tenant_hash
Current pending decisions not yet resolved
2.2 Guard metrics
Metric
Type
Labels
Description
gdev_guard_blocks_total
Counter
guard_type (input/output), reason, tenant_hash
Guard block events
gdev_guard_redactions_total
Counter
guard_type, tenant_hash
Redactions (non-blocking)
gdev_exemplar_consistency_total
Counter
status, tenant_hash
Exemplar guard outcomes: disabled, no-match, consistent, or conflict
gdev_injection_attempts_total
Counter
tenant_hash
Input injection pattern hits
2.3 LLM metrics
Metric
Type
Labels
Description
gdev_llm_requests_total
Counter
model, status (ok/error/retry), tenant_hash
LLM API calls
gdev_llm_duration_seconds
Histogram
model, tenant_hash
LLM round-trip time
gdev_llm_tokens_total
Counter
direction (input/output), model, tenant_hash
Token consumption
gdev_llm_cost_usd_total
Counter
model, tenant_hash
LLM cost in USD
gdev_llm_turns_used
Histogram
tenant_hash
Tool-use turns consumed per request
gdev_llm_retry_total
Counter
tenant_hash
LLM retries triggered
2.4 Cost and budget metrics
Metric
Type
Labels
Description
gdev_budget_utilization_ratio
Gauge
tenant_hash
Current day cost / daily budget (0.0–1.0)
gdev_budget_exceeded_total
Counter
tenant_hash
Requests blocked due to budget exhaustion
2.5 RCA and clustering metrics
Metric
Type
Labels
Description
gdev_rca_clusters_active
Gauge
tenant_hash
Active cluster count after latest run
gdev_rca_run_duration_seconds
Histogram
tenant_hash
RCA clusterer job duration
gdev_rca_tickets_scanned
Counter
tenant_hash
Tickets processed in RCA runs
gdev_embedding_duration_seconds
Histogram
tenant_hash
Embedding upsert latency
2.6 Integration metrics
Metric
Type
Labels
Description
gdev_integration_errors_total
Counter
integration (linear/telegram/sheets), tenant_hash
Integration failure count
gdev_integration_duration_seconds
Histogram
integration, tenant_hash
Integration call latency
2.7 Workflow Debug Map
Workflow step
Question it answers
Metric signal
Trace/log signal
Dashboard panel
Signature and rate-limit
Did the request pass tenant HMAC and per-user throttles?
All labels that identify a tenant use tenant_hash; the committed dashboard
uses Prometheus metrics with tenant-safe labels and does not query tenant tables
directly.
Failure-mode links from this map:
Failure mode
Primary observability path
FM_DUPLICATE_WEBHOOK_REPLAY
middleware.dedup, webhook_dedup_hit, and gdev_webhook_service_calls_total{outcome="dedup_hit"}.
FM_OUTPUT_GUARD_BLOCK
agent.output_guard, guard_blocked, and gdev_guard_blocks_total{guard_type="output"}.
FM_LLM_TIMEOUT
agent.llm_classify, llm.api_call, gdev_llm_requests_total{status="error"}, and gdev_llm_retry_total.
FM_BUDGET_EXCEEDED
agent.budget_check, gdev_budget_exceeded_total, and gdev_budget_utilization_ratio.
FM_APPROVAL_TTL_EXPIRED
agent.route, pending_expired, and gdev_approval_queue_depth.
FM_RATE_LIMIT_EXCEEDED
middleware.rate_limit, request status 429, and gdev_requests_total{status="rate_limited"}.
The central local runbook is SLO_RUNBOOK.md. It maps alerts and service symptoms
to stable failure-mode names from FAILURE_MODES.md. Per-alert runbook files may
be added later if the project adds an externally operated deployment, but the current local
scope keeps one canonical runbook.
Signal
Failure taxonomy link
Primary runbook check
gdev_guard_blocks_total{guard_type="output"}
FM_OUTPUT_GUARD_BLOCK
Inspect agent.output_guard span and unsafe-output eval cases.
gdev_llm_requests_total{status="error"} or gdev_llm_retry_total spike
FM_LLM_TIMEOUT
Check provider status, retry saturation, and whether any unsafe auto-execution occurred.
gdev_budget_utilization_ratio >= 1.0 or gdev_budget_exceeded_total increments
FM_BUDGET_EXCEEDED
Verify the LLM call was blocked before spend and notify the tenant admin.
gdev_approval_queue_depth > 20 or pending_expired spikes
FM_APPROVAL_TTL_EXPIRED
Inspect approval notification health and queue age.
rate_limit_bypass log event
FM_REDIS_DEGRADED_RATE_LIMIT
Restore Redis and consider temporary upstream throttling.
HTTP 429 from rate limiting
FM_RATE_LIMIT_EXCEEDED
Confirm retry delay behavior and traffic source.
Postgres connection or slow-query symptoms
FM_POSTGRES_UNAVAILABLE / FM_POSTGRES_DEGRADED
Check DB health, failed traces, and side-effect completion before replay.
Local SLO targets for latency, error rate, approval queue behavior, guard blocks, and dependency
failure response are defined in SLO_RUNBOOK.md. They are local targets, not a
production SLA.