Registry / observability / mitchellh-go-server-timing

mitchellh-go-server-timing

JSON →
library1.0.1gogounverified

A Go library for adding Server-Timing headers to HTTP responses.

go get github.com/mitchellh/go-server-timing
INSTALL
IMPORT
SIG · MITCHELLH-GO-SERVE
M
mitchellh-go-server-timing
observabilitygov1.0.1
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.

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.

Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
2
Resources
mitchellh-go-server-timing — go get mitchellh-go-server-timing · libregistry