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.
chiprometheus
✓ github.com/766b/chi-prometheus
Adds Prometheus metrics middleware to a Chi router.
package main
import (
"net/http"
"github.com/766b/chi-prometheus"
"github.com/go-chi/chi/v5"
)
func main() {
r := chi.NewRouter()
r.Use(chiprometheus.NewMiddleware("myapp"))
r.Get("/", 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.0.0-20211217152057-87afa9aa2ca8latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.