logmetrics

package
v0.0.162 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter []Valuer

Reporter is a collection of metric values to report.

func (*Reporter) Counter

func (r *Reporter) Counter(name, desc string, log logrus.FieldLogger, fields ...string) metrics.Counter

Counter configures a new Counter metric to report

func (*Reporter) Int64

func (r *Reporter) Int64(name, desc string, log logrus.FieldLogger, fields ...string) metrics.Int64

Int64 configures a new Int64 metric to report.

func (*Reporter) Report

func (r *Reporter) Report(ctx context.Context, log logrus.FieldLogger, freq time.Duration) error

Report the status of its metrics every freq until the context expires.

func (*Reporter) ReportNow

func (r *Reporter) ReportNow(log logrus.FieldLogger)

ReportNow reports all metrics once, immediately

type Valuer

type Valuer interface {
	metrics.Metric
	Values() map[string]map[string]interface{}
}

Valuer extends a metric to include a report on its values.

Jump to

Keyboard shortcuts

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