metrics

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Metrics = make(map[MetricType]map[string]interface{})

Functions

func Actions added in v0.1.0

func Actions() actions

Actions returns a new actions. This is the metrics for the actions.

func Events added in v0.1.0

func Events() events

Events returns a new events. This is the metrics for the events.

func Handler added in v0.1.0

func Handler() http.Handler

func InitAll added in v0.1.0

func InitAll()

func Mutator added in v0.1.0

func Mutator() mutator

mutator returns a new mutator. This is the metrics for the mutator.

func Registry added in v0.1.0

func Registry() registry

Registry returns a new registry. This is the metrics for the registry.

func Rules added in v0.1.0

func Rules() rules

Rules returns a new rules. This is the metrics for the rules.

func Tags added in v0.1.0

func Tags() tags

Tags returns a new tags. This is the metrics for the tags.

Types

type Histogram added in v0.1.0

type Histogram struct {
	prometheus.Histogram
}

func (Histogram) NewTimer added in v0.1.0

func (h Histogram) NewTimer() *prometheus.Timer

type HistogramVec added in v0.1.0

type HistogramVec struct {
	*prometheus.HistogramVec
}

func (HistogramVec) NewTimer added in v0.1.0

func (h HistogramVec) NewTimer(labelsValues ...string) *prometheus.Timer

type Metric added in v0.1.0

type Metric interface {
	GetHelp() string
	GetName() string
}

metricBase is a base struct for all metrics

type MetricCounter added in v0.1.0

type MetricCounter struct {
	Counter prometheus.Counter
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricCounter) GetHelp added in v0.1.0

func (m MetricCounter) GetHelp() string

GetHelp returns the help text of the metric

func (MetricCounter) GetName added in v0.1.0

func (m MetricCounter) GetName() string

GetName returns the name of the metric

type MetricCounterVec added in v0.1.0

type MetricCounterVec struct {
	CounterVec *prometheus.CounterVec
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricCounterVec) GetHelp added in v0.1.0

func (m MetricCounterVec) GetHelp() string

GetHelp returns the help text of the metric

func (MetricCounterVec) GetName added in v0.1.0

func (m MetricCounterVec) GetName() string

GetName returns the name of the metric

type MetricGauge added in v0.1.0

type MetricGauge struct {
	Gauge prometheus.Gauge
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricGauge) GetHelp added in v0.1.0

func (m MetricGauge) GetHelp() string

GetHelp returns the help text of the metric

func (MetricGauge) GetName added in v0.1.0

func (m MetricGauge) GetName() string

GetName returns the name of the metric

type MetricGaugeVec added in v0.1.0

type MetricGaugeVec struct {
	GaugeVec *prometheus.GaugeVec
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricGaugeVec) GetHelp added in v0.1.0

func (m MetricGaugeVec) GetHelp() string

GetHelp returns the help text of the metric

func (MetricGaugeVec) GetName added in v0.1.0

func (m MetricGaugeVec) GetName() string

GetName returns the name of the metric

type MetricHistogram added in v0.1.0

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

metricBase is a base struct for all metrics

func (MetricHistogram) GetHelp added in v0.1.0

func (m MetricHistogram) GetHelp() string

GetHelp returns the help text of the metric

func (MetricHistogram) GetName added in v0.1.0

func (m MetricHistogram) GetName() string

GetName returns the name of the metric

type MetricHistogramVec added in v0.1.0

type MetricHistogramVec struct {
	HistogramVec HistogramVec
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricHistogramVec) GetHelp added in v0.1.0

func (m MetricHistogramVec) GetHelp() string

GetHelp returns the help text of the metric

func (MetricHistogramVec) GetName added in v0.1.0

func (m MetricHistogramVec) GetName() string

GetName returns the name of the metric

type MetricSummary added in v0.1.0

type MetricSummary struct {
	Summary prometheus.Summary
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricSummary) GetHelp added in v0.1.0

func (m MetricSummary) GetHelp() string

GetHelp returns the help text of the metric

func (MetricSummary) GetName added in v0.1.0

func (m MetricSummary) GetName() string

GetName returns the name of the metric

type MetricSummaryVec added in v0.1.0

type MetricSummaryVec struct {
	SummaryVec *prometheus.SummaryVec
	// contains filtered or unexported fields
}

metricBase is a base struct for all metrics

func (MetricSummaryVec) GetHelp added in v0.1.0

func (m MetricSummaryVec) GetHelp() string

GetHelp returns the help text of the metric

func (MetricSummaryVec) GetName added in v0.1.0

func (m MetricSummaryVec) GetName() string

GetName returns the name of the metric

type MetricType added in v0.1.0

type MetricType string

metricBase is a base struct for all metrics

const (
	// MetricTypeCounter is the type of the metric counter
	MetricTypeCounter MetricType = "counter"
	// MetricTypeGauge is the type of the metric gauge
	MetricTypeGauge MetricType = "gauge"
	// MetricTypeHistogram is the type of the metric histogram
	MetricTypeHistogram MetricType = "histogram"
	// MetricTypeSummary is the type of the metric summary
	MetricTypeSummary MetricType = "summary"
)

type PromFactory added in v0.1.0

type PromFactory interface {
	prometheus.Registerer
	prometheus.Gatherer
}

Jump to

Keyboard shortcuts

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