xprometheus

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(writer http.ResponseWriter, request *http.Request)

func NewProvider

func NewProvider(config *Config) xmetrics.Provider

func NewServer

func NewServer(config *Config) xmetrics.Server

Types

type Config

type Config struct {
	Namespace string
	Subsystem string
	Path      string
	Addr      string
}

func DefaultConfig

func DefaultConfig() *Config

type Counter

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

func NewCounter

func NewCounter(cv *prometheus.CounterVec) *Counter

func NewCounterFrom

func NewCounterFrom(opts prometheus.CounterOpts, labelNames []string) *Counter

func (*Counter) Add

func (c *Counter) Add(delta float64)

func (*Counter) Inc

func (c *Counter) Inc()

func (*Counter) With

func (c *Counter) With(labelValues ...string) xmetrics.Counter

type Gauge

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

func NewGauge

func NewGauge(gv *prometheus.GaugeVec) *Gauge

func NewGaugeFrom

func NewGaugeFrom(opts prometheus.GaugeOpts, labelNames []string) *Gauge

func (*Gauge) Add

func (g *Gauge) Add(delta float64)

func (*Gauge) Inc

func (g *Gauge) Inc()

func (*Gauge) Set

func (g *Gauge) Set(value float64)

func (*Gauge) With

func (g *Gauge) With(labelValues ...string) xmetrics.Gauge

type Histogram

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

func NewHistogram

func NewHistogram(hv *prometheus.HistogramVec) *Histogram

func NewHistogramFrom

func NewHistogramFrom(opts prometheus.HistogramOpts, labelNames []string) *Histogram

func (*Histogram) Observe

func (h *Histogram) Observe(value float64)

func (*Histogram) With

func (h *Histogram) With(labelValues ...string) xmetrics.Histogram

type Summary

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

func NewSummary

func NewSummary(sv *prometheus.SummaryVec) *Summary

func NewSummaryFrom

func NewSummaryFrom(opts prometheus.SummaryOpts, labelNames []string) *Summary

func (*Summary) Observe

func (s *Summary) Observe(value float64)

func (*Summary) With

func (s *Summary) With(labelValues ...string) xmetrics.Histogram

Jump to

Keyboard shortcuts

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