← All Learning Paths

Tracing Engineer

Wire distributed tracing that tells the truth: span attributes, semantic conventions, context propagation, tail sampling, and asserting spans in tests.

roleadvanced7 nodes11.75h total

Path overview

追踪系统的价值取决于上下文传播的完整性:丢一段传播,就丢一段真相。本路径从追踪模型与关联 ID 讲起,经 Span 属性与语义约定,攻克异步上下文与尾部采样两大难点,再落地 OpenTelemetry 接入与 Span 断言测试。

A trace is only as truthful as its context propagation: one dropped hop, one lost truth. This path covers tracing models, span attributes, semantic conventions, async propagation, tail sampling, and span assertions.

  1. Read "Observability: Logging, Metrics, and Tracing" for the "The RED and USE Methods, and Request Correlation" argument, then name the decision in tracing work it would change.

    Completion criteria: Write a five-line decision note citing "The RED and USE Methods, and Request Correlation" from "Observability: Logging, Metrics, and Tracing", name the option you rejected, and attach the before/after diff of one file you changed.

    Next step: OpenTelemetry

    ⏱ 1h

  2. Read "OpenTelemetry"'s documented surface around "NodeSDK new NodeSDK({ serviceName, traceExporter, instrumentations })", then build a minimal endpoint and log the response.

    Prerequisites: Observability: Logging, Metrics, and Tracing

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

    Next step: OpenTelemetry Node Tracing Spans

    ⏱ 1h

  3. Execute "OpenTelemetry Node Tracing Spans", change one constant, and describe how the output diverges from "Instrument a Node service with OpenTelemetry tracing spans, nesting child spans across async".

    Prerequisites: OpenTelemetry

    Completion criteria: Change one constant in "OpenTelemetry Node Tracing Spans", rerun, and attach both stdout captures plus a one-line diff explaining what moved.

    Next step: Add OpenTelemetry Tracing to a Node.js Service

    ⏱ 0.75h

  4. Run "The service exports spans with the configured service name." from "Add OpenTelemetry Tracing to a Node.js Service" and confirm the documented result "Initialize the SDK before importing the application, with a service name and OTLP exporter.".

    Prerequisites: OpenTelemetry Node Tracing Spans

    Completion criteria: Run the steps through "The service exports spans with the configured service name.", paste the command output, and mark the line that matches "Initialize the SDK before importing the application, with a service name and OTLP exporter."; then rerun with one parameter changed.

    Next step: Assert Spans in Trace Tests

    ⏱ 0.5h

  5. Apply "Assert Spans in Trace Tests" to a tracing task, checking that "Spans are exported synchronously into memory and available immediately after the request" appears after the "Verify that a request produces the expected trace tree and attributes, instead of eyeballing" step.

    Prerequisites: Add OpenTelemetry Tracing to a Node.js Service

    Completion criteria: Deliver a transcript of "Assert Spans in Trace Tests" with each step's command and observed state, ending at "Verify that a request produces the expected trace tree and attributes, instead of eyeballing".

    Next step: Reconstruct a Trace from Span Records

    ⏱ 0.5h

  6. Build "Reconstruct a Trace from Span Records" for tracing code and verify {roots:[{id:r1,name:GET against both samples.

    Prerequisites: Assert Spans in Trace Tests

    Completion criteria: Submit a solution for "Tracing Engineer" that passes both samples ({spans:[{id:r1,name:GET to {roots:[{id:r1,name:GET) and attach the failing case you fixed.

    Next step: Capstone: Tracing Engineer

    ⏱ 0.5h

  7. Deliver the "Build a Distributed Tracing Collector" blueprint with "Trace assembler" working and "Span store" recorded as evidence.

    Prerequisites: Assert Spans in Trace Tests, Reconstruct a Trace from Span Records

    Completion criteria: Run the project's test command for "Build a Distributed Tracing Collector", paste the passing output, and attach the acceptance note for "Trace assembler" with the test name.

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

    ⏱ 4h