Menu Code: VO (via /o11y-engineer)
Goal: Verify that actual traces, metrics, and logs match the observability spec. Produce validation reports and generate fix stories for gaps.
Before concluding any span, metric, or log is missing, the agent MUST run this mandatory validation gate:
| Step | What It Checks | Why |
|---|---|---|
| 1 | Service name | Names may differ due to prefixes/casing |
| 2 | Namespace/environment | Ensure correct deployment scope |
| 3 | Time window | Service must be actively receiving traffic |
| 4 | Span names | Framework conventions may affect naming |
| 5 | Attribute existence | Confirm attributes are populated |
!!! danger “Never Skip” The Query Validation Gate prevents false negatives. A “missing span” conclusion is only valid after all 5 steps pass.
Read the observability spec from observability-specs/{service}-spec.yaml.
Execute each of the 5 steps to confirm the data source is accessible and correctly scoped.
For each contract type:
Trace Contracts:
Log Contracts:
Metric Contracts:
Correlation Contracts:
Dual-format reports:
Human-readable (_bmad-output/o11y-artifacts/reports/{service}-validation-{date}.md):
# Observability Validation Report
## Service: registration-service
## Overall Status: PARTIAL (18/22 passed)
### Failures
| Contract | Expected | Actual | Severity |
|----------|----------|--------|----------|
| trace: POST /api/register child span | db.query INSERT users | Not found | HIGH |
| log: trace_id correlation | 100% | 73% | MEDIUM |
Machine-readable (_bmad-output/o11y-artifacts/reports/{service}-validation-{date}.yaml)
For each failure:
spec_reference pointing to the failed contracttest_criteria with the DQL query that should pass| Severity | Meaning | Action |
|---|---|---|
| CRITICAL | SLO-impacting, data loss | Immediate fix, blocks release |
| HIGH | Spec violation, missing contracts | Fix in current sprint |
| MEDIUM | Best practice deviation | Fix in next sprint |
| LOW | Minor improvement | Backlog |
After fix stories are implemented (Phase 7), run validation again:
graph TD
V[Validate] --> R{All Pass?}
R -->|Yes| Done[Production Ready]
R -->|No| Fix[Fix Stories]
Fix --> Impl[Implementation]
Impl --> V
If all validations pass, the service has production-grade observability. If not, fix stories feed back into Phase 7: Implementation.