Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Latency is the latency metric that wrappered or composite api calls will // update. Latency LatencyMetric = &latencyAdapter{m: helperLatencyHistogram} // Errors counts errors encountered by api helpers. Errors ResultMetric = &resultAdapter{m: helperResultCounter} )
Functions ¶
func InstrumentedTransport ¶
func InstrumentedTransport(t http.RoundTripper) http.RoundTripper
InstrumentedTransport is middleware that wraps the provided http.RoundTripper, adding the default Prometheus http client metrics.
The transport should be re-used between clients or the metrics will get lost/re-initialised.
func RegisterMetrics ¶
func RegisterMetrics()
RegisterMetrics ensures that the package metrics are registered.
Types ¶
type LatencyMetric ¶
LatencyMetric observes latency of wrappered or composite api calls.
type ResultMetric ¶
ResultMetric counts wrappered function errors.
Click to show internal directories.
Click to hide internal directories.