Registry / observability / thoas-stats

thoas-stats

JSON →
library0.0.0-20190407194641-965cb2de1678gogounverified

A Go middleware that provides request statistics for HTTP servers.

go get github.com/thoas/stats
INSTALL
IMPORT
SIG · THOAS-STATS
T
thoas-stats
observabilitygov0.0.0-20190407194641-965cb2de1678
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.

stats
github.com/thoas/stats

Add request statistics middleware to an HTTP server.

package main import ( "net/http" "github.com/thoas/stats" ) func main() { h := stats.New() http.HandleFunc("/stats", func(w http.ResponseWriter, r *http.Request) { w.Write(h.Snapshot()) }) http.ListenAndServe(":8080", h.Handler(http.DefaultServeMux)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20190407194641-965cb2de1678latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
1
Resources
thoas-stats — go get thoas-stats · libregistry