Registry /
observability / contrib-instrumentation-github-com-gorilla-mux-otelmux
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
otelmux
✓ go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux
Add OpenTelemetry middleware to a Gorilla Mux router.
package main
import (
"net/http"
"github.com/gorilla/mux"
"go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux"
)
func main() {
r := mux.NewRouter()
r.Use(otelmux.Middleware("my-service"))
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello"))
})
http.ListenAndServe(":8080", r)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.69.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.