package metrics
import "github.com/hashicorp/go-metrics/compat"
Index ¶
- Constants
- func AddSample(key []string, val float32)
- func AddSampleWithLabels(key []string, val float32, labels []Label)
- func EmitKey(key []string, val float32)
- func IncrCounter(key []string, val float32)
- func IncrCounterWithLabels(key []string, val float32, labels []Label)
- func MeasureSince(key []string, start time.Time)
- func MeasureSinceWithLabels(key []string, start time.Time, labels []Label)
- func SetGauge(key []string, val float32)
- func SetGaugeWithLabels(key []string, val float32, labels []Label)
- func Shutdown()
- func UpdateFilter(allow, block []string)
- func UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string)
- type AggregateSample
- type BlackholeSink
- type Config
- type Encoder
- type FanoutSink
- type GaugeValue
- type InmemSignal
- func DefaultInmemSignal(inmem *InmemSink) *InmemSignal
- func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal
- type InmemSink
- type IntervalMetrics
- type Label
- type MetricSink
- func NewInmemSinkFromURL(u *url.URL) (MetricSink, error)
- func NewMetricSinkFromURL(urlStr string) (MetricSink, error)
- func NewStatsdSinkFromURL(u *url.URL) (MetricSink, error)
- func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error)
- type Metrics
- func Default() *Metrics
- func New(conf *Config, sink MetricSink) (*Metrics, error)
- func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error)
- type MetricsSummary
- type PointValue
- type SampledValue
- type ShutdownSink
- type StatsdSink
- type StatsiteSink
Constants ¶
const ( // DefaultSignal is used with DefaultInmemSignal DefaultSignal = metrics.DefaultSignal )
Functions ¶
func AddSample ¶
func AddSampleWithLabels ¶
func EmitKey ¶
func IncrCounter ¶
func IncrCounterWithLabels ¶
func MeasureSince ¶
func MeasureSinceWithLabels ¶
func SetGauge ¶
func SetGaugeWithLabels ¶
func Shutdown ¶
func Shutdown()
func UpdateFilter ¶
func UpdateFilter(allow, block []string)
func UpdateFilterAndLabels ¶
func UpdateFilterAndLabels(allow, block, allowedLabels, blockedLabels []string)
Types ¶
type AggregateSample ¶
type AggregateSample = metrics.AggregateSample
type BlackholeSink ¶
type BlackholeSink = metrics.BlackholeSink
type Config ¶
type Config = metrics.Config
func DefaultConfig ¶
type Encoder ¶
type Encoder = metrics.Encoder
type FanoutSink ¶
type FanoutSink = metrics.FanoutSink
type GaugeValue ¶
type GaugeValue = metrics.GaugeValue
type InmemSignal ¶
type InmemSignal = metrics.InmemSignal
func DefaultInmemSignal ¶
func DefaultInmemSignal(inmem *InmemSink) *InmemSignal
func NewInmemSignal ¶
type InmemSink ¶
type InmemSink = metrics.InmemSink
func NewInmemSink ¶
type IntervalMetrics ¶
type IntervalMetrics = metrics.IntervalMetrics
func NewIntervalMetrics ¶
func NewIntervalMetrics(intv time.Time) *IntervalMetrics
type Label ¶
type Label = metrics.Label
type MetricSink ¶
type MetricSink = metrics.MetricSink
func NewInmemSinkFromURL ¶
func NewInmemSinkFromURL(u *url.URL) (MetricSink, error)
func NewMetricSinkFromURL ¶
func NewMetricSinkFromURL(urlStr string) (MetricSink, error)
func NewStatsdSinkFromURL ¶
func NewStatsdSinkFromURL(u *url.URL) (MetricSink, error)
func NewStatsiteSinkFromURL ¶
func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error)
type Metrics ¶
type Metrics = metrics.Metrics
func Default ¶
func Default() *Metrics
func New ¶
func New(conf *Config, sink MetricSink) (*Metrics, error)
func NewGlobal ¶
func NewGlobal(conf *Config, sink MetricSink) (*Metrics, error)
type MetricsSummary ¶
type MetricsSummary = metrics.MetricsSummary
type PointValue ¶
type PointValue = metrics.PointValue
type SampledValue ¶
type SampledValue = metrics.SampledValue
type ShutdownSink ¶
type ShutdownSink = metrics.ShutdownSink
type StatsdSink ¶
type StatsdSink = metrics.StatsdSink
func NewStatsdSink ¶
func NewStatsdSink(addr string) (*StatsdSink, error)
type StatsiteSink ¶
type StatsiteSink = metrics.StatsiteSink
func NewStatsiteSink ¶
func NewStatsiteSink(addr string) (*StatsiteSink, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
compat/circonus | |
compat/datadog | |
compat/prometheus |
- Version
- v0.5.4 (latest)
- Published
- Jan 8, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 10 hours ago –
Tools for package owners.