basic

command
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL