metric

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const CustomMetrics = "custom_metrics"

CustomMetrics is the name of the field we add in the context.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics is a struct containing all custom prometheus metrics

func NewMetrics

func NewMetrics() *Metrics

NewMetrics is the constructor for the custom metrics

func (*Metrics) AddCustomMetricsMiddleware

func (m *Metrics) AddCustomMetricsMiddleware(next echo.HandlerFunc) echo.HandlerFunc

AddCustomMetricsMiddleware is the function to add the middleware in echo

func (*Metrics) IncAllFlag

func (m *Metrics) IncAllFlag()

IncAllFlag increment the number call to AllFlag

func (*Metrics) IncCollectEvalData added in v1.7.0

func (m *Metrics) IncCollectEvalData(numberEvents float64)

IncCollectEvalData add new

func (*Metrics) IncFlagEvaluation

func (m *Metrics) IncFlagEvaluation(flagName string)

IncFlagEvaluation increment the number of flag evaluations

func (*Metrics) MetricList

func (m *Metrics) MetricList() []*prometheus.Metric

MetricList return the available metrics

Jump to

Keyboard shortcuts

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