metrics

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPServerDurationHistogramName = "gopl_http_server_duration_seconds"
)

Variables

View Source
var (
	BucketFast   = []float64{0.001, 0.003, 0.007, 0.015, 0.05, 0.1, 0.2, 0.5, 1, 2, 5}
	BucketMedium = []float64{0.001, 0.005, 0.015, 0.05, 0.1, 0.25, 0.5, 0.75, 1, 1.5, 2, 3.5, 5}
	BucketSlow   = []float64{0.05, 0.1, 0.2, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5}
)

Functions

func Handler

func Handler() http.Handler

func Init

func Init(cn string) error

func NewCounter added in v0.6.6

func NewCounter(
	name string,
	labels []string,
	opts ...Option,
) *prometheus.CounterVec

func NewHistogram added in v0.6.6

func NewHistogram(
	name string,
	labels []string,
	opts ...Option,
) *prometheus.HistogramVec

Types

type Option added in v0.6.6

type Option = c.Option[creator]

func WithBuckets added in v0.6.6

func WithBuckets(buckets []float64) Option

func WithoutServicePrefix added in v0.6.6

func WithoutServicePrefix() Option

Jump to

Keyboard shortcuts

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