Documentation ¶
Overview ¶
The metrics package instruments your code.
Set DEBUG=metrics environment variable to print metrics to stdout.
Index ¶
Examples ¶
Constants ¶
View Source
const Version = "1.1"
Variables ¶
View Source
var Namespace string
Namespace is the namespace under which all metrics will get incremented. Typically this should match up with the running service ("api", "admin", "jobs", "parcels", &c).
Functions ¶
func Increment ¶
func Increment(name string)
Increment a counter with the given name.
Example ¶
Start("web", "test@example.com") Increment("dequeue.success")
Output:
func Measure ¶
Measure that the given metric has the given value.
Example ¶
Start("web", "test@example.com") Measure("workers.active", 6)
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.