metrics

package
v0.0.0-...-60ad15e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(InitMetrics)

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	MetricRequests metric.Int64Counter
	MetricSeconds  metric.Float64Histogram
	Meter          metric.Meter
	AppInfo        *bootstrap.AppInfo
}

func InitMetrics

func InitMetrics(appInfo bootstrap.AppInfo) (*Metrics, error)

func NewMetrics

func NewMetrics(appInfo *bootstrap.AppInfo) *Metrics

func (*Metrics) IncrementLabelOrderCount

func (m *Metrics) IncrementLabelOrderCount(ctx context.Context, key, value string)

IncrementLabelOrderCount increments the order count metric with a label.

func (*Metrics) IncrementOrderCount

func (m *Metrics) IncrementOrderCount(ctx context.Context)

IncrementOrderCount increments the order count metric.

func (*Metrics) RecordOrderCount

func (m *Metrics) RecordOrderCount(ctx context.Context, value int64)

RecordOrderCount records the order count metric.

Jump to

Keyboard shortcuts

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