feat: add structured error taxonomy and prometheus metrics (AURA-RM-008 + RM-001)#80
Closed
brandon-shelton-mezmo wants to merge 3 commits into
Closed
feat: add structured error taxonomy and prometheus metrics (AURA-RM-008 + RM-001)#80brandon-shelton-mezmo wants to merge 3 commits into
brandon-shelton-mezmo wants to merge 3 commits into
Conversation
Establish spec-kit directory structure with constitution, spec templates (product, architecture, quality), and 11 roadmap items (AURA-RM-001 through AURA-RM-011) covering production readiness gaps from metrics to incident response. Define the 7-phase development lifecycle with multi-agent review gates. Ref: LOG-00000 Signed-off-by: brandon.shelton <brandon.shelton@mezmo.com>
AURA-RM-008: Structured Error Taxonomy - ErrorCategory enum with 13 runtime error categories - AuraError struct separating internal messages (logs) from sanitized client-facing messages (API responses) - ErrorDetail::classified() and validation() constructors - From impls for DetectedToolError and StreamTermination - All 6 error construction sites updated with taxonomy codes - Existing error_type values frozen (Article I compliance) - 13 unit tests AURA-RM-001: Prometheus Metrics Endpoint - /metrics endpoint with Prometheus text exposition format - aura_http_request_duration_seconds histogram (25ms-300s) - aura_llm_tokens_total counter (by type/provider/agent) - aura_mcp_tool_duration_seconds histogram (10ms-60s) - aura_errors_total counter (by taxonomy category) - aura_http_requests_in_flight gauge - aura_mcp_server_connected gauge - AURA_METRICS_ENABLED kill switch - /health and /metrics exempt from shutdown_guard - Cardinality guards (100 tool cap, 64-char name limit) - 9 integration tests, 2 unit tests - Starter Grafana dashboard (examples/grafana/) Ref: LOG-00000 Signed-off-by: brandon.shelton <brandon.shelton@mezmo.com>
8acd031 to
6b846c2
Compare
The metrics tests sent `"model": "Test Assistant"` (the agent name) but model lookup uses `alias` when set. The test config has `alias = "test-assistant"`, causing 404 on chat requests. Signed-off-by: brandon-shelton-mezmo <brandon.shelton@mezmo.com>
8 tasks
Author
|
Superseded by PR #117 which includes both AURA-RM-008 and AURA-RM-002 changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ErrorCategoryenum (13 categories),AuraErrorsanitization layer, taxonomycodefield in API error responses. Client-facing messages are generic — internal details logged server-side only./metricsendpoint with 6 metric families — request duration histogram, token counters, tool duration histogram, error counters, in-flight gauge, MCP connection gauge. IncludesAURA_METRICS_ENABLEDkill switch and cardinality guards.examples/grafana/aura-dashboard.jsonVerified
cargo fmt --checkcleancargo clippy --all-targets --all-features -- -D warningscleancargo test --workspace --lib— 299 unit tests passintegration-metricsfeature flag)/healthand/metricsaccessible during graceful shutdownSpecs
.specify/specs/AURA-RM-008/— product, architecture, quality specs + review records (4 rounds → clean).specify/specs/AURA-RM-001/— product, architecture, quality specs + review records (3 rounds → clean)Ref: LOG-00000