metrics

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package metrics provides an interface for various metric destinations

Metric types supported:

c - counter
g - gauge
h - histogram
ms - timing
s - set
t - text

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	AddSetValue(string, string) error                               // type 's'  - set metric (ala statsd, counts unique values)
	AddSetValueWithTags(string, []string, string) error             // type 's'  - set metric (ala statsd, counts unique values) with tags
	IncrementCounter(string) error                                  // type 'c'  - counter (monotonically increasing value)
	IncrementCounterWithTags(string, []string) error                // type 'c'  - counter (monotonically increasing value) with tags
	IncrementCounterByValue(string, uint64) error                   // type 'c'  - counter (monotonically increasing value)
	IncrementCounterByValueWithTags(string, []string, uint64) error // type 'c'  - counter (monotonically increasing value) with tags
	SetGaugeValue(string, interface{}) error                        // type 'g'  - gauge (ints or floats)
	SetGaugeValueWithTags(string, []string, interface{}) error      // type 'g'  - gauge (ints or floats) with tags
	SetHistogramValue(string, float64) error                        // type 'h'  - histogram
	SetHistogramValueWithTags(string, []string, float64) error      // type 'h'  - histogram with tags
	SetTextValue(string, string) error                              // type 't'  - text metric
	SetTextValueWithTags(string, []string, string) error            // type 't'  - text metric with tags
	SetTimingValue(string, float64) error                           // type 'ms' - histogram
	SetTimingValueWithTags(string, []string, float64) error         // type 'ms' - histogram with tags
	Start() error
	Stop() error
}

Destination defines the interface required by the metric destination.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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