package circonus

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

Index

Types

type CirconusSink

type CirconusSink struct {
	// contains filtered or unexported fields
}

CirconusSink provides an interface to forward metrics to Circonus with automatic check creation and metric management

func NewCirconusSink

func NewCirconusSink(cc *Config) (*CirconusSink, error)

NewCirconusSink - create new metric sink for circonus

one of the following must be supplied:

Note: If submission url is supplied w/o an api token, the public circonus ca cert will be used to verify the broker for metrics submission.

func (*CirconusSink) AddSample

func (s *CirconusSink) AddSample(key []string, val float32)

AddSample adds a sample to a histogram metric

func (*CirconusSink) AddSampleWithLabels

func (s *CirconusSink) AddSampleWithLabels(key []string, val float32, labels []metrics.Label)

AddSampleWithLabels adds a sample to a histogram metric with the given labels

func (*CirconusSink) EmitKey

func (s *CirconusSink) EmitKey(key []string, val float32)

EmitKey is not implemented in circonus

func (*CirconusSink) Flush

func (s *CirconusSink) Flush()

Flush manually triggers metric submission to Circonus

func (*CirconusSink) IncrCounter

func (s *CirconusSink) IncrCounter(key []string, val float32)

IncrCounter increments a counter metric

func (*CirconusSink) IncrCounterWithLabels

func (s *CirconusSink) IncrCounterWithLabels(key []string, val float32, labels []metrics.Label)

IncrCounterWithLabels increments a counter metric with the given labels

func (*CirconusSink) SetGauge

func (s *CirconusSink) SetGauge(key []string, val float32)

SetGauge sets value for a gauge metric

func (*CirconusSink) SetGaugeWithLabels

func (s *CirconusSink) SetGaugeWithLabels(key []string, val float32, labels []metrics.Label)

SetGaugeWithLabels sets value for a gauge metric with the given labels

func (*CirconusSink) SetPrecisionGauge

func (s *CirconusSink) SetPrecisionGauge(key []string, val float64)

SetPrecisionGauge sets value for a gauge metric with float64 precision

func (*CirconusSink) SetPrecisionGaugeWithLabels

func (s *CirconusSink) SetPrecisionGaugeWithLabels(key []string, val float64, labels []metrics.Label)

SetPrecisionGaugeWithLabels sets value for a gauge metric with the given labels with float64 precision

func (*CirconusSink) Shutdown

func (s *CirconusSink) Shutdown()

Shutdown blocks while flushing metrics to the backend.

func (*CirconusSink) Start

func (s *CirconusSink) Start()

Start submitting metrics to Circonus (flush every SubmitInterval)

type Config

type Config cgm.Config

Config options for CirconusSink See https://github.com/circonus-labs/circonus-gometrics for configuration options

Source Files

circonus.go

Version
v0.5.4 (latest)
Published
Jan 8, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
5 days ago

Tools for package owners.