WAF-AGN-070 β Agent Observability
Description
Agent activities must be visible and measurable. Telemetry must be collected for all agents including tokens, latency, GPU utilization, and decision metrics. Metrics must be ingested into a monitoring system. Distributed tracing must link agent operations end-to-end.
Rationale
Without observability, agent operations become a black box:
Performance issues: Cannot detect latency spikes, token waste, or model degradation.
Cost overruns: No visibility into token consumption leads to unexpected costs.
Failed debugging: Cannot identify root cause of agent failures without logs.
Compliance gaps: Many frameworks require monitoring of automated systems.
Missed optimization opportunities: Cannot identify improvement areas without metrics.
Requirements
-
Token usage metrics (input, output, total) must be collected
-
Latency metrics must be tracked and alert on anomalies
-
GPU/CPU utilization must be monitored for compute-heavy agents
-
Error rates and failure types must be tracked
-
Distributed tracing must link operations end-to-end
Implementation Guidance
-
Set up metrics collection: Configure CloudWatch, Prometheus, or third-party monitoring
-
Create dashboards: Build agent health dashboards for monitoring teams
-
Configure alerts: Set alarms for unusual patterns (high latency, high errors)
-
Implement tracing: Use X-Ray or OpenTelemetry for request tracking
-
Document baseline metrics: Establish normal ranges for comparison
Maturity Levels
| Level | Name | Criteria |
|---|---|---|
1 |
No Observability |
No metrics. No logging. No visibility into agent operations. |
2 |
Basic Logging |
Basic request/response logging. Minimal metrics. |
3 |
Full Telemetry |
Token metrics, latency, errors all collected. Dashboards configured. |
4 |
Proactive Monitoring |
Alerts on anomalies. Automated scaling based on load. |
5 |
Predictive Observability |
AI models predict issues before they occur. |
Terraform Checks
waf-agn-070.tf.aws.metrics-configured
Checks: Agent metrics are configured (tokens, latency, GPU utilization).
| Compliant | Non-Compliant |
|---|---|
|
No metrics alarms configured |
waf-agn-070.tf.aws.distributed-tracing-enabled
Checks: Distributed tracing (X-Ray) is enabled for agent operations.
# Compliant
resource "aws_lambda_function" "agent_traced" {
function_name = "agent-traced"
environment {
variables = {
AWS_XRAY_TRACING_NAME = "agent-service"
}
}
}
Remediation: Configure metrics for tokens and latency. Enable X-Ray tracing. Set up log integration with monitoring system.
Evidence
| Type | Required | Description |
|---|---|---|
IaC |
β Required |
CloudWatch alarms, X-Ray configuration, metric definitions. |
Config |
β Required |
Monitoring dashboards, alert thresholds, sampling rates. |
Process |
β Required |
Metric analysis reports, alert response runbooks, performance baselines. |
Governance |
β Required |
Observability policy defining requirements and monitoring standards. |
Regulatory Mapping
| Framework | Controls |
|---|---|
ISO 27001:2022 |
A.8.1 β Information security roles and responsibilities; A.8.2 β Privileged access rights |
NIST SP 800-53 |
AU-2 β Event logging; AU-3 β Event content; SI-4 β Information system monitoring |
NIST CSF 2.0 |
DE.CM β Continuous monitoring; DE.DP β Data protection |
GDPR |
Art. 32 β Security of processing; Art. 5(1)(f) β Integrity and confidentiality |
PCI DSS v4.0 |
Req 10 β Monitor and detect threats |
TISAX |
Information security β Monitoring and logging |
ANSSI SecNumCloud |
Domain β Logging and monitoring |
BIO |
BIO β Logboekhouding en monitoring |
ENS High |
op.exp.6 β GestiΓ³n de cambios |
UK NCSC CAF |
A4 β Policy and assurance |
FedRAMP |
AU-2, AU-3, SI-4 (Moderate baseline) |
CMMC 2.0 |
AU.L2-3.8.1 β Flow audit logs to central log management |
IT-Grundschutz |
ORP.1 β Informationstechnisch-related Angriffsschutz |
IRAP |
ISM β Logging and monitoring |
CCCS PBMM |
AU-2, AU-3 β Logging and audit |
MAS TRM |
Ch.9 β Change management |
ISMAP |
Monitoring and logging controls |
FISC |
Technical measures β Logging and monitoring |
AWS Well-Architected Framework |
Security Pillar β Logging and monitoring; Reliability Pillar β Monitoring |
Google Cloud Architecture Framework |
Reliability β Monitoring; Security β Monitoring |
BSI C5:2020 |
OPS-01 β Operational monitoring |
SOC 2 Type II |
CC4.1 β Monitoring activities; CC7.1 β Infrastructure and software monitoring |
CSA STAR |
CCM Logging and Monitoring |