package
0.0.0-20230728070032-dd9e68f319d5
Repository: https://github.com/weaveworks/common.git
Documentation: pkg.go.dev

# Functions

CollectedRequest runs a tracked request.
ErrorCode converts an error into an HTTP status code.
NewHistogramCollector creates a Collector from a metric.
NewHistogramCollectorFromOpts creates a Collector from histogram options.
NewJobCollector instantiates JobCollector which creates its metrics.
ObserveWithExemplar adds a sample to a histogram, and adds an exemplar if the context has a sampled trace.
TimeRequestHistogram runs 'f' and records how long it took in the given Prometheus histogram metric.
TimeRequestHistogramStatus runs 'f' and records how long it took in the given Prometheus histogram metric.

# Variables

DefBuckets are histogram buckets for the response time (in seconds) of a network service, including one that is responding very slowly.
HistogramCollectorBuckets define the buckets when passing the metric.

# Structs

HistogramCollector collects the duration of a request.
JobCollector collects metrics for jobs.

# Interfaces

Collector describes something that collects data before and/or after a task.