package
3.0.0-rc.3+incompatible
Repository: https://github.com/vitessio/vitess.git
Documentation: pkg.go.dev

# Packages

Package influxdbbackend is useful for publishing metrics to an InfluxDB backend (tested on v0.88).
Package opentsdb adds support for pushing stats to opentsdb.

# Functions

CounterForDimension returns a CountTracker for the provided dimension.
GetSnakeName calls toSnakeName on the passed in string.
NewCounter returns a new Counter.
NewCounterDuration returns a new CounterDuration.
NewCounterDurationFunc creates a new CounterDurationFunc instance and publishes it if name is set.
NewCounterFunc creates a new CounterFunc instance and publishes it if name is set.
NewCountersFuncWithMultiLabels creates a new CountersFuncWithMultiLabels mapping to the provided function.
NewCountersWithMultiLabels creates a new CountersWithMultiLabels instance, and publishes it if name is set.
NewCountersWithSingleLabel create a new Counters instance.
NewGauge creates a new Gauge and publishes it if name is set.
NewGaugeDuration returns a new GaugeDuration.
NewGaugeDurationFunc creates a new GaugeDurationFunc instance and publishes it if name is set.
NewGaugeFunc creates a new GaugeFunc instance and publishes it if name is set.
NewGaugesFuncWithMultiLabels creates a new GaugesFuncWithMultiLabels mapping to the provided function.
NewGaugesWithMultiLabels creates a new GaugesWithMultiLabels instance, and publishes it if name is set.
NewGaugesWithSingleLabel creates a new GaugesWithSingleLabel and publishes it if the name is set.
NewGenericHistogram creates a histogram where all the labels are supplied by the caller.
NewHistogram creates a histogram with auto-generated labels based on the cutoffs.
NewMultiTimings creates a new MultiTimings object.
NewRates reports rolling rate information for countTracker.
NewString returns a new String.
NewTimings creates a new Timings object, and publishes it if name is set.
Publish is expvar.Publish+hook.
PublishJSONFunc publishes any function that returns a JSON string as a variable.
Register allows you to register a callback function that will be called whenever a new stats variable gets created.
RegisterPushBackend allows modules to register PushBackend implementations.

# Structs

Counter tracks a cumulative count of a metric.
CounterDuration exports a time.Duration as counter.
CounterDurationFunc allows to provide the value via a custom function.
CounterFunc allows to provide the counter value via a custom function.
CountersFuncWithMultiLabels is a multidimensional counters implementation where names of categories are compound names made with joining multiple strings with '.'.
CountersWithMultiLabels is a multidimensional counters implementation.
CountersWithSingleLabel tracks multiple counter values for a single dimension ("label").
Gauge tracks the current value of an integer metric.
GaugeDuration exports a time.Duration as gauge.
GaugeDurationFunc allows to provide the value via a custom function.
GaugeFunc is the same as CounterFunc but meant for gauges.
GaugesFuncWithMultiLabels is a wrapper around CountersFuncWithMultiLabels for values that go up/down for implementations (like Prometheus) that need to differ between Counters and Gauges.
GaugesWithMultiLabels is a CountersWithMultiLabels implementation where the values can go up and down.
GaugesWithSingleLabel is similar to CountersWithSingleLabel, except its meant to track the current value and not a cumulative count.
Histogram tracks counts and totals while splitting the counts under different buckets using specified cutoffs.
MultiTimings is meant to tracks timing data by categories as well as histograms.
Rates is capable of reporting the rate (typically QPS) for any variable that satisfies the CountTracker interface.
Ring of int64 values Not thread safe.
String is expvar.String+Get+hook.
Timings is meant to tracks timing data by named categories as well as histograms.

# Interfaces

CountTracker defines the interface that needs to be supported by a variable for being tracked by Rates.
MultiTracker is a CountTracker that tracks counts grouping them by more than one dimension.
PushBackend is an interface for any stats/metrics backend that requires data to be pushed to it.
Variable is the minimal interface which each type in this "stats" package must implement.

# Type aliases

FloatFunc converts a function that returns a float64 as an expvar.
JSONFunc is the public type for a single function that returns json directly.
NewVarHook is the type of a hook to export variables in a different way.
StringFunc converts a function that returns an string as an expvar.
StringMapFunc is the function equivalent of StringMap.