OpenTelemetry integration for treemux
To install:
go get github.com/uptrace/treemux/extra/treemuxotel
To use:
import "github.com/uptrace/treemux/extra/treemuxotel"
router := treemux.New(
treemux.WithMiddleware(treemuxotel.NewMiddleware()),
)
With options:
import "github.com/uptrace/treemux/extra/treemuxotel"
otelMiddleware := treemuxotel.NewMiddleware(
treemuxotel.WithClientIP(false),
)
router := treemux.New(
treemux.WithMiddleware(otelMiddleware),
)