Registry / observability / slok-go-http-metrics

slok-go-http-metrics

JSON →
library0.13.0gogounverified

Package gohttpmetrics measures HTTP metrics in different metric formats with middleware for various frameworks.

go get github.com/slok/go-http-metrics
INSTALL
IMPORT
SIG · SLOK-GO-HTTP-METRI
S
slok-go-http-metrics
observabilitygov0.13.0
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.

gohttpmetrics
github.com/slok/go-http-metrics

Wrap an HTTP handler with metrics middleware.

package main import ( "net/http" "github.com/slok/go-http-metrics/middleware" "github.com/slok/go-http-metrics/middleware/std" ) func main() { mdlw := middleware.New(middleware.Config{}) handler := std.Handler("", mdlw, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) })) http.ListenAndServe(":8080", handler) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.13.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
2
Amazon
1
Resources
slok-go-http-metrics — go get slok-go-http-metrics · libregistry