Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/hashicorp/go-metrics
/ functions
Functions
345 in github.com/hashicorp/go-metrics
⨍
Functions
345
◇
Types & classes
36
↓ 77 callers
Method
getKeys
()
sink_test.go:23
↓ 26 callers
Function
mockMetric
()
metrics_test.go:13
↓ 23 callers
Method
String
()
inmem.go:129
↓ 21 callers
Method
SetGauge
A Gauge should retain the last value it is set to
sink.go:15
↓ 15 callers
Function
insert
Creates a new slice with the provided string value as the first element and the provided slice values as the remaining values. Ordering of the values
metrics.go:318
↓ 11 callers
Method
SetGaugeWithLabels
(key []string, val float32, labels []Label)
sink.go:16
↓ 10 callers
Function
flattenKey
(parts []string, labels []metrics.Label)
prometheus/prometheus.go:284
↓ 10 callers
Method
pushMetric
Does a non-blocking push to the metrics queue
statsd.go:120
↓ 10 callers
Method
pushMetric
Does a non-blocking push to the metrics queue
statsite.go:120
↓ 9 callers
Method
IncrCounter
Counters should accumulate values
sink.go:22
↓ 9 callers
Method
IncrCounterWithLabels
(key []string, val float32, labels []Label)
sink.go:23
↓ 9 callers
Function
NewInmemSink
NewInmemSink is used to construct a new in-memory sink. Uses an aggregation interval and maximum retention period.
inmem.go:160
↓ 8 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
sink.go:27
↓ 8 callers
Function
HasElem
(s any, elem any)
metrics_test.go:424
↓ 8 callers
Method
IncrCounterWithLabels
(key []string, val float32, labels []Label)
inmem.go:212
↓ 8 callers
Function
NewPrometheusSinkFrom
NewPrometheusSinkFrom creates a new PrometheusSink using the passed options.
prometheus/prometheus.go:116
↓ 8 callers
Method
SetGauge
(key []string, val float32)
metrics.go:19
↓ 8 callers
Method
getInterval
getInterval returns the current interval. A new interval is created if no previous interval exists, or if the current time is beyond the window for th
inmem.go:281
↓ 7 callers
Method
AddSample
Samples are for timing information, where quantiles are used
sink.go:26
↓ 7 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
inmem.go:235
↓ 7 callers
Method
Data
Data is used to retrieve all the aggregated metrics The metric for the current interval is a snapshot Intervals may be in use, and a read lock should
inmem.go:257
↓ 7 callers
Method
EmitKey
Should emit a Key/Value pair for each call
sink.go:19
↓ 7 callers
Method
Flush
Flush manually triggers metric submission to Circonus
circonus/circonus.go:58
↓ 7 callers
Function
NewCirconusSink
NewCirconusSink - create new metric sink for circonus one of the following must be supplied: - API Token - search for an existing check or create a n
circonus/circonus.go:36
↓ 7 callers
Method
SetPrecisionGauge
(key []string, val float64)
sink.go:32
↓ 7 callers
Method
flattenKey
Flattens the key for formatting, removes spaces
statsd.go:97
↓ 7 callers
Method
flattenKey
Flattens the key for formatting, removes spaces
statsite.go:97
↓ 6 callers
Method
AddSample
(key []string, val float32)
inmem.go:231
↓ 6 callers
Method
IncrCounter
(key []string, val float32)
inmem.go:208
↓ 6 callers
Method
MeasureSince
(key []string, start time.Time)
metrics.go:146
↓ 6 callers
Method
SetGauge
(key []string, val float32)
inmem.go:172
↓ 6 callers
Method
Stop
Stop is used to stop the InmemSignal from listening
inmem_signal.go:52
↓ 6 callers
Method
UpdateFilterAndLabels
UpdateFilterAndLabels overwrites the existing filter with the given rules.
metrics.go:180
↓ 6 callers
Method
allowMetric
Returns whether the metric should be allowed based on configured prefix filters Also return the applicable labels
metrics.go:254
↓ 6 callers
Method
flattenKey
Flattens key to Circonus metric name
circonus/circonus.go:125
↓ 6 callers
Function
prometheusLabels
(labels []metrics.Label)
prometheus/prometheus.go:297
↓ 5 callers
Function
DefaultConfig
DefaultConfig provides a sane default configuration
start.go:60
↓ 5 callers
Method
DisplayMetrics
DisplayMetrics returns a summary of the metrics from the most recent finished interval.
inmem_endpoint.go:69
↓ 5 callers
Method
MeasureSinceWithLabels
(key []string, start time.Time, labels []Label)
metrics.go:150
↓ 5 callers
Function
New
New is used to create a new instance of Metrics
start.go:79
↓ 5 callers
Method
SetGaugeWithLabels
(key []string, val float32, labels []Label)
inmem.go:176
↓ 5 callers
Method
Shutdown
Shutdown the metric sink, flush metrics to storage, and cleanup resources. Called immediately prior to application exit. Implementations must block un
sink.go:42
↓ 5 callers
Method
Write
(p []byte)
inmem_signal_test.go:76
↓ 5 callers
Function
assertServerMatchesExpected
(t *testing.T, server *net.UDPConn, buf []byte, expected string)
datadog/dogstatsd_test.go:158
↓ 5 callers
Method
getFlatkeyAndCombinedLabels
(key []string, labels []metrics.Label)
datadog/dogstatsd.go:146
↓ 5 callers
Function
mockNewDogStatsdSink
nolint:unparam
datadog/dogstatsd_test.go:67
↓ 4 callers
Method
EmitKey
(key []string, val float32)
inmem.go:198
↓ 4 callers
Function
MockGetHostname
()
prometheus/prometheus_test.go:298
↓ 4 callers
Method
SetPrecisionGaugeWithLabels
(key []string, val float64, labels []Label)
sink.go:33
↓ 4 callers
Method
Stddev
Computes a Stddev of the values
inmem.go:97
↓ 4 callers
Function
fakeBroker
(q chan string)
circonus/circonus_test.go:59
↓ 4 callers
Method
flattenKeyLabels
Flattens the key along with labels for formatting, removes spaces
statsd.go:112
↓ 4 callers
Method
flattenKeyLabels
Flattens the key along with labels for formatting, removes spaces
statsite.go:112
↓ 4 callers
Method
flattenKeyLabels
Flattens the key for formatting along with its labels, removes spaces
inmem.go:330
↓ 4 callers
Method
flattenKeyLabels
Flattens the key along with labels for formatting, removes spaces
circonus/circonus.go:138
↓ 4 callers
Method
flattenLabels
Flattens the key for formatting along with its labels, removes spaces
inmem_signal.go:114
↓ 3 callers
Method
Mean
Computes a mean of the values
inmem.go:107
↓ 3 callers
Function
MockGetHostname
()
datadog/dogstatsd_test.go:23
↓ 3 callers
Function
NewPrometheusPushSink
NewPrometheusPushSink creates a PrometheusPushSink by taking an address, interval, and destination name.
prometheus/prometheus.go:455
↓ 3 callers
Method
UpdateFilter
UpdateFilter overwrites the existing filter with the given rules.
metrics.go:175
↓ 3 callers
Method
collectAtTime
collectAtTime allows internal testing of the expiry based logic here without mocking clocks or making tests timing sensitive. fn is the collection cal
prometheus/prometheus.go:164
↓ 3 callers
Method
filterLabels
filterLabels return only allowed labels the caller should lock m.filterLock while calling this method
metrics.go:239
↓ 2 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
sink.go:104
↓ 2 callers
Method
EmitRuntimeStats
Emits various runtime statsitics
metrics.go:279
↓ 2 callers
Method
Encode
(any)
inmem_endpoint.go:167
↓ 2 callers
Method
IncrCounterWithLabels
(key []string, val float32, labels []Label)
sink.go:94
↓ 2 callers
Method
Ingest
Ingest is used to update a sample
inmem.go:115
↓ 2 callers
Function
NewDogStatsdSink
NewDogStatsdSink is used to create a new DogStatsdSink with sane defaults
datadog/dogstatsd.go:23
↓ 2 callers
Function
NewInmemSignal
NewInmemSignal creates a new InmemSignal which listens for a given signal, and dumps the current metrics out to a writer
inmem_signal.go:32
↓ 2 callers
Function
NewPrometheusSink
NewPrometheusSink creates a new PrometheusSink using the default options.
prometheus/prometheus.go:111
↓ 2 callers
Function
NewStatsdSink
NewStatsdSink is used to create a new StatsdSink
statsd.go:37
↓ 2 callers
Function
NewStatsiteSink
NewStatsiteSink is used to create a new StatsiteSink
statsite.go:37
↓ 2 callers
Method
SetGaugeWithLabels
(key []string, val float32, labels []Label)
sink.go:65
↓ 2 callers
Method
SetGaugeWithLabels
(key []string, val float32, labels []Label)
metrics.go:23
↓ 2 callers
Method
SetPrecisionGaugeWithLabels
(parts []string, val float64, labels []metrics.Label)
prometheus/prometheus.go:317
↓ 2 callers
Function
duration
(t *testing.T, s string)
inmem_test.go:180
↓ 2 callers
Function
fakeServer
(q chan string)
prometheus/prometheus_test.go:302
↓ 2 callers
Method
flattenKey
Flattens the key for formatting, removes spaces
inmem.go:319
↓ 2 callers
Method
flattenKey
(parts []string)
datadog/dogstatsd.go:50
↓ 2 callers
Function
formatSamples
(source map[string]SampledValue)
inmem_endpoint.go:142
↓ 2 callers
Function
newMetricSummaryFromInterval
(interval *IntervalMetrics)
inmem_endpoint.go:88
↓ 2 callers
Method
parseKey
(key []string)
datadog/dogstatsd.go:66
↓ 2 callers
Function
setupTestServerAndBuffer
(t *testing.T)
datadog/dogstatsd_test.go:78
↓ 1 callers
Method
AddSample
(key []string, val float32)
statsd.go:86
↓ 1 callers
Method
AddSample
(key []string, val float32)
sink.go:100
↓ 1 callers
Method
AddSample
(key []string, val float32)
statsite.go:86
↓ 1 callers
Method
AddSample
(key []string, val float32)
metrics.go:121
↓ 1 callers
Method
AddSample
AddSample adds a sample to a histogram metric
circonus/circonus.go:104
↓ 1 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
statsd.go:91
↓ 1 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
statsite.go:91
↓ 1 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
metrics.go:125
↓ 1 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []Label)
sink_test.go:74
↓ 1 callers
Method
AddSampleWithLabels
(parts []string, val float32, labels []metrics.Label)
prometheus/prometheus.go:359
↓ 1 callers
Method
AddSampleWithLabels
(key []string, val float32, labels []metrics.Label)
datadog/dogstatsd.go:135
↓ 1 callers
Method
Collect
Collect meets the collection interface and allows us to enforce our expiration logic to clean up ephemeral metrics if their value haven't been set for
prometheus/prometheus.go:157
↓ 1 callers
Method
EmitKey
(key []string, val float32)
statsd.go:71
↓ 1 callers
Method
EmitKey
(key []string, val float32)
sink.go:84
↓ 1 callers
Method
EmitKey
(key []string, val float32)
statsite.go:71
↓ 1 callers
Method
EnableHostNamePropagation
EnableHostnamePropagation forces a Dogstatsd `host` tag with the value specified by `s.HostName` Since the go-metrics package has its own mechanism fo
datadog/dogstatsd.go:46
↓ 1 callers
Method
IncrCounter
(key []string, val float32)
statsd.go:76
next →
1–100 of 345, ranked by callers