metrics

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package metrics provides a set of metrics for the application.

Index

Constants

View Source
const (
	// DefaultMetricCounterLabel is the default label for a counter metric.
	DefaultMetricCounterLabel = "counter"

	// Name of the package/application.
	Name = "etler"
)

Variables

This section is empty.

Functions

func NewInt

func NewInt(name string) *expvar.Int

NewInt creates and initializes a new int metric.

func NewIntWithPattern

func NewIntWithPattern(t, subject string, status status.Status) *expvar.Int

NewIntWithPattern creates and initializes a new expvar.Int with a consistent naming pattern where `t` is the type of the entity, `subject` is the subject of the metric, `status` is the status of the metric - usually from the `status` package.

func NewString

func NewString(name string) *expvar.String

NewString creates and initializes a new stribg metric.

func NewStringWithPattern

func NewStringWithPattern(t, subject string, status status.Status) *expvar.String

NewStringWithPattern creates and initializes a new expvar.String with a consistent naming pattern where `t` is the type of the entity, `subject` is the subject of the metric, `status` is the status of the metric - usually from the `status` package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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