metric

package
v0.0.0-...-476b611 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogOptions = LogOptionBulder{}

Functions

This section is empty.

Types

type LogArgs

type LogArgs struct {
	Tags   map[string]string
	LogMsg string
	Level  *logrus.Level
}

type LogMetricReporter

type LogMetricReporter struct{}

func (LogMetricReporter) Record

func (l LogMetricReporter) Record(ctx context.Context, metric Measure, opts ...any)

type LogOptionBulder

type LogOptionBulder struct{}

func (LogOptionBulder) WithLevel

func (LogOptionBulder) WithLevel(l logrus.Level) func(*LogArgs)

func (LogOptionBulder) WithLogMessage

func (LogOptionBulder) WithLogMessage(msg string) func(*LogArgs)

func (LogOptionBulder) WithTags

func (LogOptionBulder) WithTags(tags map[string]string) func(*LogArgs)

type Measure

type Measure struct {
	Name  string
	Value float64
}

type MetricReporter

type MetricReporter struct {
	Record func(ctx context.Context, m Measure, opts ...any)
}

func NewLogMetricReporter

func NewLogMetricReporter() MetricReporter

Jump to

Keyboard shortcuts

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