Documentation
¶
Overview ¶
Package main demonstrates basic OpenTelemetry tracing with HTTP middleware.
This example shows how to: 1. Configure tracing with proper provider setup 2. Set up HTTP middleware for automatic tracing 3. Create custom spans manually 4. Add attributes and events to spans 5. Handle errors with tracing
Usage:
go run main.go curl http://localhost:8080/hello curl http://localhost:8080/error
View traces at: http://localhost:16686
Click to show internal directories.
Click to hide internal directories.