Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LabeledMiddleware ¶
LabeledMiddleware will get passed the endpoint name when passed to WrapAllLabeledExcept, this can be used to write a generic metrics middleware which can send the endpoint name to the metrics collector.
func ErrorCounter ¶
func ErrorCounter(errCount metrics.Counter) LabeledMiddleware
ErrorCounter is a LabeledMiddleware, when applied with WrapAllLabeledExcept name will be populated with the endpoint name, and such this middleware will report errors to the metric provider with the endpoint name. Feel free to copy this example middleware to your service.
func Latency ¶
func Latency(h metrics.Histogram) LabeledMiddleware
Latency is a LabeledMiddleware, reporting the request time of and endpoint along with its name
Click to show internal directories.
Click to hide internal directories.