package metrics

import "github.com/hashicorp/go-metrics/compat"

Index

Constants

const (
	// DefaultSignal is used with DefaultInmemSignal
	DefaultSignal = metrics.DefaultSignal
)

Functions

func AddSample

func AddSample(key []string, val float32)

func AddSampleWithLabels

func AddSampleWithLabels(key []string, val float32, labels []Label)

func EmitKey

func EmitKey(key []string, val float32)

func IncrCounter

func IncrCounter(key []string, val float32)

func IncrCounterWithLabels

func IncrCounterWithLabels(key []string, val float32, labels []Label)

func MeasureSince

func MeasureSince(key []string, start time.Time)

func MeasureSinceWithLabels

func MeasureSinceWithLabels(key []string, start time.Time, labels []Label)

func SetGauge

func SetGauge(key []string, val float32)

func SetGaugeWithLabels

func SetGaugeWithLabels(key []string, val float32, labels []Label)

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

func DefaultConfig(serviceName string) *Config

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

func NewInmemSignal(inmem *InmemSink, sig syscall.Signal, w io.Writer) *InmemSignal

type InmemSink

type InmemSink = metrics.InmemSink

func NewInmemSink

func NewInmemSink(interval, retain time.Duration) *InmemSink

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

armon.go

Directories

PathSynopsis
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.