prometheus

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrometheusPlugin

func NewPrometheusPlugin(metrics *PromMetrics) *prometheusPlugin

NewPrometheusPlugin 创建插件

Types

type CounterVec

type CounterVec interface {
	Inc(labels ...string)
	Add(v float64, labels ...string)
	Close() bool
}

func NewCounterVec

func NewCounterVec(c *CounterVecOpts) CounterVec

type CounterVecOpts

type CounterVecOpts VectorOpts

type GaugeVec

type GaugeVec interface {
	Set(v float64, labels ...string)
	Inc(labels ...string)
	Add(v float64, labels ...string)
	Close() bool
}

func NewGaugeVec

func NewGaugeVec(opt *GaugeVecOpts) GaugeVec

type GaugeVecOpts

type GaugeVecOpts VectorOpts

type HistogramVec

type HistogramVec interface {
	Observe(v int64, labels ...string)
	Close() bool
}

func NewHistogramVec

func NewHistogramVec(opt *HistogramVecOpts) HistogramVec

type HistogramVecOpts

type HistogramVecOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	Labels    []string
	Buckets   []float64
}

type PromMetrics

type PromMetrics struct {
	// contains filtered or unexported fields
}

func NewPromMetrics

func NewPromMetrics(opts ...metrics.Option) *PromMetrics

func (*PromMetrics) Enabled

func (that *PromMetrics) Enabled() bool

func (*PromMetrics) Init

func (that *PromMetrics) Init(option ...metrics.Option)

func (*PromMetrics) Options

func (that *PromMetrics) Options() metrics.Options

func (*PromMetrics) Shutdown

func (that *PromMetrics) Shutdown()

Shutdown prometheus 组件不需要停止

func (*PromMetrics) Start

func (that *PromMetrics) Start()

func (*PromMetrics) String

func (that *PromMetrics) String() string

type VectorOpts

type VectorOpts struct {
	Namespace string
	Subsystem string
	Name      string
	Help      string
	Labels    []string
}

Jump to

Keyboard shortcuts

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