operational

package
v0.1.10-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TypeCounter metricType = "counter"
View Source
const TypeGauge metricType = "gauge"
View Source
const TypeHistogram metricType = "histogram"
View Source
const TypeSummary metricType = "summary"

Variables

This section is empty.

Functions

func GetDocumentation

func GetDocumentation() string

Types

type MetricDefinition

type MetricDefinition struct {
	Name   string
	Help   string
	Type   metricType
	Labels []string
}

func DefineMetric

func DefineMetric(name, help string, t metricType, labels ...string) MetricDefinition

type Metrics

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

func NewMetrics

func NewMetrics(settings *config.MetricsSettings) *Metrics

func (*Metrics) CreateInQueueSizeGauge

func (o *Metrics) CreateInQueueSizeGauge(stage string, f func() int)

func (*Metrics) CreateOutQueueSizeGauge

func (o *Metrics) CreateOutQueueSizeGauge(stage string, f func() int)

func (*Metrics) CreateRecordsWrittenCounter

func (o *Metrics) CreateRecordsWrittenCounter(stage string) prometheus.Counter

func (*Metrics) GetOrCreateStageDurationHisto

func (o *Metrics) GetOrCreateStageDurationHisto() *prometheus.HistogramVec

func (*Metrics) NewCounter

func (o *Metrics) NewCounter(def *MetricDefinition, labels ...string) prometheus.Counter

func (*Metrics) NewCounterVec

func (o *Metrics) NewCounterVec(def *MetricDefinition) *prometheus.CounterVec

func (*Metrics) NewGauge

func (o *Metrics) NewGauge(def *MetricDefinition, labels ...string) prometheus.Gauge

func (*Metrics) NewGaugeFunc

func (o *Metrics) NewGaugeFunc(def *MetricDefinition, f func() float64, labels ...string)

func (*Metrics) NewGaugeVec added in v0.1.8

func (o *Metrics) NewGaugeVec(def *MetricDefinition) *prometheus.GaugeVec

func (*Metrics) NewHistogram

func (o *Metrics) NewHistogram(def *MetricDefinition, buckets []float64, labels ...string) prometheus.Histogram

func (*Metrics) NewHistogramVec

func (o *Metrics) NewHistogramVec(def *MetricDefinition, buckets []float64) *prometheus.HistogramVec

func (*Metrics) NewSummary

func (o *Metrics) NewSummary(def *MetricDefinition, labels ...string) prometheus.Summary

type Server

type Server struct {
	Address string
	// contains filtered or unexported fields
}

func NewHealthServer

func NewHealthServer(opts *config.Options, isAlive healthcheck.Check, isReady healthcheck.Check) *Server

func (*Server) Serve

func (hs *Server) Serve()

type Timer

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

func NewTimer

func NewTimer(o prometheus.Observer) *Timer

func (*Timer) ObserveMilliseconds

func (t *Timer) ObserveMilliseconds()

func (*Timer) ObserveSeconds

func (t *Timer) ObserveSeconds()

func (*Timer) Start

func (t *Timer) Start() time.Time

Start starts or restarts the timer, regardless if a previous call occurred without being observed first

func (*Timer) StartOnce

func (t *Timer) StartOnce() time.Time

StartOnce starts the timer just the first time. Subsequent calls will be ignored, until the timer is observed

Jump to

Keyboard shortcuts

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