prometheus

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Default bucket count 1000 can satisfy the precision of p99 for most histogram stats.
	DefaultBucketCount = 1000
)

Variables

This section is empty.

Functions

func NewMetrics

func NewMetrics(cfg *Config) (*metrics, error)

NewMetrics initializes a new instance of Prometheus metrics.

Types

type Config

type Config struct {
	Enabled              bool
	Namespace            string // optional
	Subsystem            string // optional
	HistogramBucketCount int    // Number of buckets for histogram, default to 1000
	// Number of buckets for time buckets, default to 1000.
	// The bucket size is 0.01s(10ms), so the maximum covered time range is 10ms * TimeBucketCount.
	TimeBucketCount int
}

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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