1. Understand the Goal: The user wants an "error taxonomy" (a system for classifying errors) and "aggregation" (grouping them), with a specific focus on "SLO impacts" (Service Level Objectives). The output needs to be structured, actionable, and relevant to Site Reliability Engineering (SRE) or platform engineering contexts.
-
Deconstruct the Request:
- Error Taxonomy: What kinds of errors are there? (Client vs. Server, Transient vs. Permanent, Code vs. Infra, etc.).
- Aggregation: How do we group these errors to make sense of them? (By service, by error code, by user impact).
- SLO Impacts: How do these errors affect the promises we make to users (Availability, Latency, Throughput, Quality)?
-
Step 1: Define the High-Level Taxonomy (The "What"):
- I need a hierarchy. Let's start broad and narrow down.
- Layer 1: Origin.
- Client-side (4xx).
- Server-side (5xx).
- Infrastructure (DNS, Network, DB).
- Third-party (Dependencies).
- Layer 2: Nature/Behavior.
- Hard errors (Failed).
- Soft errors (Degraded).
- Transient (Retryable).
- Permanent (Requires fix).
- Layer 3: Blast Radius.
- Single user.
- Tenant/Org.
- Global/Systemic.
-
Step 2: Link to SLOs (The "So What"):
- SLOs usually fall into categories defined by SLIs (Service Level Indicators).
- Availability: Did it work? (Impacted by 5xx, timeouts).
- Latency: Was it fast enough? (Impacted by retries, queuing, GC pauses).
- Throughput: Did we process enough volume? (Impacted by backpressure).
- Correctness: Is the data right? (Impacted by logic bugs, corruption - harder to measure but important).
-
Step 3: Define Aggregation Strategies (The "How to Measure"):
- Raw logs are useless. We need buckets.
- Temporal Aggregation: Error Rate per minute/hour.
- Structural Aggregation: By Service -> By Endpoint -> By Error Code.
- Impact-based Aggregation: "SLO Breaching Events" (Error Budget burn).
-
Step 4: Structure the Response:
- Introduction: Define the scope.
- Taxonomy Framework: A hierarchical table or list.
- Aggregation Strategy: How to group the data.
- SLO Impact Mapping: The critical connection between error type and business metric.
- Example Scenario: To make it concrete.
-
Drafting the Content (Iterative refinement):
-
Refining the Taxonomy: Instead of just "4xx/5xx", let's use "Fault Domains".
- Application: Logic, Validation.
- System: CPU, Mem, Disk.
- Network: Timeouts, Reset.
- Dependency: DB, API.
-
Refining SLO Impact: Not all errors are equal for SLOs.
- A 404 (Not Found) usually doesn't count against availability SLOs (it's valid HTTP), but might count against correctness if it was supposed to be there.
- A 503 (Service Unavailable) definitely hits availability.
- Retries hit latency but might save availability.
-
Refining Aggregation: Introduce "Error Budgets".
- Grouping by "Root Cause" is too hard for automation. Grouping by "Signature" (Service + HTTP Code + Endpoint) is better.
-
Polishing the Output:
- Use clear headings.
- Use tables for readability.
- Add a section on "Implementation" (Tags/Labels) to make it practical.
-
Self-Correction/Review during drafting:
- Initial thought: Maybe I should just list HTTP codes.
- Correction: No, that's too basic. Errors can be "success" (HTTP 200) but with garbage data (Logic Error). Or HTTP 200 but took 30 seconds (Latency Error). The taxonomy must include logical and performance errors, not just network/HTTP errors.
-
Final Structure Plan:
- Phase 1: The Taxonomy Model (Categorization).
- Phase 2: Aggregation Logic (Grouping).
- Phase 3: SLO Impact Analysis (Mapping).
- Phase 4: Practical Implementation (Labels/Tags).
-
Writing the response. (This aligns with the generated output provided previously). I will ensure I distinguish between "Technical Errors" (Exceptions) and "Product Errors" (Bad UX/Logic). I will also emphasize the difference between incidents (user sees it) and internal errors (retries invisible to user).
-
Final Polish: Ensure terms like "Error Budget," "Burn Rate," and "SLI" are used correctly in context. (Proceeding to generate output).
To build a functional error taxonomy with SLO (Service Level Objective) impacts, you must move beyond simple "HTTP status codes" and classify errors based on User Impact, Origin, and Recoverability.
Not all errors are equal. A 404 Not Found on a minor asset does not burn your availability SLO, but a 503 Service Unavailable on your checkout API burns it immediately.
Here is a comprehensive framework for an Error Taxonomy, Aggregation Strategy, and SLO Impact Analysis.
Phase 1: The Error Taxonomy (Classification)
We classify errors into a hierarchy. The top level determines Responsibility, and the second level determines Severity/Type.
1. Fault Domain (Who/Where)
- Client-Side (The "It's You" Class): Errors originating from invalid user input or bad client logic.
- Examples:
400 Bad Request, 401 Unauthorized, 404 Not Found.
- Server-Side (The "It's Me" Class): Errors originating from your code, infrastructure, or configuration.
- Examples:
500 Internal Server Error, 503 Overloaded, Timeouts.
- Dependency (The "It's Them" Class): Errors caused by upstream services (DBs, Third-party APIs).
- Examples: Database connection pool exhaustion, Payment gateway timeouts.
- Infrastructure (The "Metal" Class): Errors below the application layer.
- Examples: DNS failures, TLS handshake errors, Network partition.
2. Impact Type (The "What")
- Hard Errors: The request failed completely. No data was processed.
- Soft Errors (Degradation): The request succeeded but with missing data (e.g., a partial page render) or high latency.
- Logical Errors: The system returned
200 OK, but the business logic failed (e.g., double charge, email sent to wrong user). These are the most dangerous for SLOs.
Phase 2: Aggregation Strategy
You cannot calculate SLOs on raw logs. You must aggregate errors into Checkpoints or Buckets.
The "Golden Signal" Aggregation
Group your metrics by these tags before calculating SLO impact:
- Service: (e.g.,
checkout-service, search-api)
- Endpoint: (e.g.,
POST /order, GET /search)
- Error Category: (e.g.,
5xx, 4xx, timeout)
The SLI (Service Level Indicator) Formula
To aggregate effectively, define your "Good Events" vs. "Valid Events."
- Availability SLI:
(Total Valid Requests - Server-Side Errors) / Total Valid Requests
- Latency SLI:
(Requests served under threshold) / Total Valid Requests
Phase 3: SLO Impact Mapping
This is the core logic. We map the taxonomy to specific SLO impacts (Availability, Latency, Correctness) and define the Severity.
| Error Category | Sub-Type | Impact on Availability SLO? | Impact on Latency SLO? | Impact on Correctness SLO? | Severity Level |
|---|
| Client (4xx) | 400 Bad Request | No (User error) | No | No | Low (Ignore for SLO) |
| Client (4xx) | 429 Rate Limited | Partial (Depends on policy) | No | No | Medium |
| Server (5xx) | 500 Generic Error | Yes (100% burn) | No | No | Critical |
| Server (5xx) | 503 Overloaded | Yes (100% burn) | Yes (Requests failing fast) | No | Critical |
| Server (Logic) | 200 OK (Wrong Data) | No | No | Yes (100% burn) | Catastrophic |
| Dependency | DB Timeout | Yes | Yes (High wait time) | No | High |
| Client (Latency) | User Network Slow | No | No (Use server-side metrics only) | No | Low |
SLO Burn Rate Calculation
When aggregating, use the Burn Rate to determine if an error pattern requires immediate action (alerting).
- Formula:
(Current Error Rate) / (Allowed Error Budget)
- Example: If your SLO allows 0.1% errors, and you are currently seeing 1% errors, your burn rate is 10x.
Phase 4: Implementation Example (Prometheus/OTel)
Here is how you would implement this taxonomy in code or metrics labels.
1. Instrumentation Labels
When emitting a metric (e.g., http_server_requests_count), ensure you include the taxonomy in the tags:
{
"metric": "http_requests_total",
"labels": {
"service": "checkout",
"status_code": "503",
"error_type": "db_connection_failed", // Specific Taxonomy
"impact_class": "server_side", // High-level Taxonomy
"slo_bucket": "availability" // Which SLO bucket this hits
},
"value": 1
}
2. Aggregation Query (PromQL)
To calculate the current SLO error budget consumption, you aggregate the "Bad" events.
Calculate Availability SLO (Last 30m):
sum(rate(http_requests_total{impact_class="server_side", status_code=~"5.."}[30m]))
/
sum(rate(http_requests_total[30m]))
Calculate Latency SLO (Requests > 500ms):
sum(rate(http_request_duration_seconds_bucket{le="0.5"}[30m]))
/
sum(rate(http_request_duration_seconds_count[30m]))
Phase 5: The "Actionable" Decision Tree
Once aggregated, route the errors based on their taxonomy:
- Is it 4xx?
- Action: Route to Product/Engineering logs only. Do not wake up a human. Update documentation or client validation if frequency spikes.
- Is it 5xx (Generic)?
- Action: Wake up on-call engineer immediately (High Burn Rate).
- Is it Dependency/Timeout?
- Action: Trigger Circuit Breaker. Alert on-call if error budget burn rate > 2% in 1 hour.
- Is it Logic/Correctness?
- Action: This requires a separate "Data Integrity" SLO. Alert immediately. This cannot be fixed by a simple rollback if data is corrupted.
Summary of the Taxonomy Structure
- Class: Origin (Client vs Server vs Infra).
- Domain: Component (DB, API, Cache, Auth).
- Behavior: State (Crash, Hang, Corruption).
- SLO Impact: Which promise was broken (Uptime, Speed, Accuracy).