Documentation
¶
Overview ¶
Package http-trace-span-propagation demonstrates trace span propagation across HTTP, forge, and file I/O layers using the observer pattern.
Scenario:
- HTTP POST with JSON body {"name":"Alice"} to a greeting service.
- Server decodes JSON, calls a forge computation function.
- Forge writes the result to a temp file for persistence.
- Server returns the JSON greeting.
A single stats.NewFanout value wires a demo tracer, metrics, and structured logging. The tracer records parent→child span names to prove context propagation works through every layer.
Run with: go run ./examples/http-trace-span-propagation
Click to show internal directories.
Click to hide internal directories.