← All Learning Paths

Error Tracking Engineer

Turn exceptions into signals: error taxonomy, budgets and burn rates, structured logging, sampling, and alert routing that respects on-call sleep.

roleintermediate8 nodes11.42h total

Path overview

错误追踪的目标不是看到所有错误,而是在正确的时间叫醒正确的人。本路径从错误分类与预算体系讲起,经结构化日志与采样策略,落地请求 ID 贯穿与燃尽率告警,收尾于 Sentry 的生产化接入。

Error tracking is not seeing every error; it is waking the right person at the right time. This path covers error taxonomy, budgets and burn rates, structured logging, sampling, and Sentry.

  1. Compare "Propagation with Context" with "The Top-Level Handler: Log, Respond, Exit" in "Error Handling Patterns for Production Applications" and state which trade-off you would accept in errors code.

    Completion criteria: Record a short walkthrough of "Error Handling Patterns for Production Applications" with timestamps at "Propagation with Context" and "The Top-Level Handler: Log, Respond, Exit", plus the commit that applies it.

    Next step: Add Structured JSON Logging

    ⏱ 1h

  2. Execute "Add Structured JSON Logging" end to end, then repeat the last step with one parameter changed and compare "Emit one JSON object per request with a stable schema, correlation id, status, duration,".

    Prerequisites: Error Handling Patterns for Production Applications

    Completion criteria: Run the steps through "Emit one JSON object per request with a stable schema, correlation id, status, duration,", paste the command output, and mark the line that matches "Log lines are single JSON objects and sensitive headers are replaced with [REDACTED]."; then rerun with one parameter changed.

    Next step: Propagate Request IDs Through Logs

    ⏱ 0.5h

  3. Run "Add request correlation IDs to an HTTP service without trusting arbitrary client input." from "Propagate Request IDs Through Logs" and confirm the documented result "Every request has a safe, bounded correlation ID.".

    Prerequisites: Add Structured JSON Logging

    Completion criteria: Deliver a transcript of "Propagate Request IDs Through Logs" with each step's command and observed state, ending at "Add request correlation IDs to an HTTP service without trusting arbitrary client input.".

    Next step: Sample High-Volume Info Logs Without Losing Errors

    ⏱ 0.5h

  4. Apply "Sample High-Volume Info Logs Without Losing Errors" to a errors task, checking that "pino is added to package.json and the lockfile is updated." appears after the "Implement deterministic per-request sampling for info logs while always emitting warnings," step.

    Prerequisites: Propagate Request IDs Through Logs

    Completion criteria: Run "Sample High-Volume Info Logs Without Losing Errors" twice — once as written and once with a changed input — and attach both transcripts with the observed difference.

    Next step: Add an Error-Budget Burn-Rate Alert

    ⏱ 0.5h

  5. Execute "Add an Error-Budget Burn-Rate Alert" end to end, then repeat the last step with one parameter changed and compare "Detect a severe reliability incident early while avoiding noisy alerts from normal".

    Prerequisites: Sample High-Volume Info Logs Without Losing Errors

    Completion criteria: Run the steps through "Detect a severe reliability incident early while avoiding noisy alerts from normal", paste the command output, and mark the line that matches "A burn rate of 1 consumes the budget exactly over the SLO window; 14.4 consumes it in about"; then rerun with one parameter changed.

    Next step: Sentry

    ⏱ 0.5h

  6. Wire "Sentry" into a scratch errors project, following "Sentry.init Sentry.init({ dsn, environment, release, tracesSampleRate })", and record one working request/response pair.

    Prerequisites: Add an Error-Budget Burn-Rate Alert

    Completion criteria: Run a request against "Sentry", paste the response, and add one deliberately invalid call with its error.

    Next step: Group Errors by Fingerprint

    ⏱ 1h

  7. In the "Error Tracking Engineer" path, implement "Group Errors by Fingerprint" so JSON object: { errors: [{ name, message }] } yields [{fingerprint:TimeoutError:request <hex> timed out after, including the second sample's edge case.

    Prerequisites: Sentry

    Completion criteria: Submit a solution for "Error Tracking Engineer" that passes both samples ({errors:[{name:TimeoutError,message:request 8f3a1b2c timed to [{fingerprint:TimeoutError:request <hex> timed out after) and attach the failing case you fixed.

    Next step: Capstone: Error Tracking Engineer

    ⏱ 0.42h

  8. Build "Build a Structured Log Pipeline" through its phases, keeping "Ingest buffer" independently testable.

    Prerequisites: Sentry, Group Errors by Fingerprint

    Completion criteria: Run the project's test command for "Build a Structured Log Pipeline", paste the passing output, and attach the acceptance note for "Ingest buffer" with the test name.

    Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.

    ⏱ 4h