Registry / observability / 766b-chi-prometheus

766b-chi-prometheus

JSON →
library0.0.0-20211217152057-87afa9aa2ca8gogounverified

Package chi-prometheus provides Prometheus metrics middleware for the Chi router.

go get github.com/766b/chi-prometheus
INSTALL
IMPORT
SIG · 766B-CHI-PROMETHEU
7
766b-chi-prometheus
observabilitygov0.0.0-20211217152057-87afa9aa2ca8
harness data pending
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.

Agent activity
49 hits · last 30 days
node
40
OpenAI (training)
1
Resources
766b-chi-prometheus — go get 766b-chi-prometheus · libregistry