Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory func(next http.RoundTripper, opts ...Option) http.RoundTripper
Factory creates middleware instances. Created by NewFactory.
func NewFactory ¶
func NewFactory(opts ...FactoryOption) Factory
NewFactory will create a function for creating metric middlewares. The resulting function can be called multiple times to obtain multiple middleware instances. Each instance can be configured with different options that will be applied to the same underlying metrics.
type FactoryOption ¶
type FactoryOption func(*factoryConfig)
FactoryOption is used to pass options in NewFactory.
func WithLabels ¶
func WithLabels(labels ...string) FactoryOption
WithLabels will configure additional labels to apply to the metrics.
func WithNamespace ¶
func WithNamespace(namespace string) FactoryOption
WithNamespace will configure the namespace to apply to the metrics.
func WithRequestDurationBuckets ¶
func WithRequestDurationBuckets(buckets []float64) FactoryOption
WithRequestDurationBuckets will configure the duration buckets used for incoming request histogram buckets.
Click to show internal directories.
Click to hide internal directories.