Documentation ¶
Overview ¶
Package statsd collects and reports telemetry from http handlers.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Codes ¶
Codes collects and reports the counts of response codes for the handler chain for all requests.
Example ¶
package main import ( "github.com/streadway/handy/statsd" "io" "io/ioutil" "net" "net/http" "time" ) func main() { var remote io.Writer remote, err := net.Dial("udp", "127.0.0.1:8126") if err != nil { // log error and continue remote = ioutil.Discard } http.ListenAndServe(":8080", statsd.Codes(remote, "doc.status", 10*time.Second, http.FileServer(http.Dir("/usr/share/doc")))) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.