contrib/go-chi/chi.v5

Those integration are enabled by having the following import in the project’s orchestrion.tool.go file:

import (
	_ "github.com/DataDog/orchestrion"

	_ "gopkg.in/DataDog/dd-trace-go.v1/contrib/go-chi/chi.v5" // integration
	//...
)

chi is a lightweight, idiomatic and composable router for building Go HTTP services.

NewMux

Join Point
All of
Advice
Replace the expression using the template:
// Using the following synthetic imports:
import (
	chi "github.com/go-chi/chi/v5"
	chitrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/go-chi/chi.v5"
)
func() *chi.Mux {
	mux := {{ . }}
	mux.Use(chitrace.Middleware())
	return mux
}()