prometheus

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 3 Imported by: 203

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRecorder

func NewRecorder(cfg Config) metrics.Recorder

NewRecorder returns a new metrics recorder that implements the recorder using Prometheus as the backend.

Types

type Config

type Config struct {
	// Prefix is the prefix that will be set on the metrics, by default it will be empty.
	Prefix string
	// DurationBuckets are the buckets used by Prometheus for the HTTP request duration metrics,
	// by default uses Prometheus default buckets (from 5ms to 10s).
	DurationBuckets []float64
	// Registry is the registry that will be used by the recorder to store the metrics,
	// if the default registry is not used then it will use the default one.
	Registry prometheus.Registerer
}

Config has the dependencies and values of the recorder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL