Registry /
observability / mitchellh-go-server-timing
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.
servertiming
✓ github.com/mitchellh/go-server-timing
Add server timing metrics to HTTP handlers
package main
import (
"net/http"
"github.com/mitchellh/go-server-timing"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
h := servertiming.FromContext(r.Context())
defer h.NewMetric("db").Stop()
w.Write([]byte("hello"))
})
http.ListenAndServe(":8080", nil)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.0.1latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.