datadog

package module
v0.0.0-...-e339850 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2017 License: MIT Imports: 5 Imported by: 0

README

go-metrics-datadog

Datadog reporter for go-metrics

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FlushLength = 32

FlushLength determines the number of metrics to be buffered before submitting to Datadog.

Functions

func WithAddress

func WithAddress(v string) configFn

WithAddress sets the UDP address to report datadog metrics

func WithClient

func WithClient(v *statsd.Client) configFn

WithClient sets the statsd client used to send metrics to Datadog

func WithPercentiles

func WithPercentiles(v []float64) configFn

WithPercentiles sets the percentiles to use for statistical metrics. The default percentiles are 75%, 95%, 99% and 99.9%

Set to nil to disable percentiles.

func WithPrefix

func WithPrefix(v string) configFn

WithPrefix sets a Datadog namespace for all metrics

func WithRegistry

func WithRegistry(v metrics.Registry) configFn

WithRegistry sets the registry from which metrics should be reported

Types

type Reporter

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

Reporter represents a Datadog metrics reporter

func New

func New(options ...configFn) (r *Reporter, err error)

New creates a new Datadog metrics reporter

func (*Reporter) Flush

func (r *Reporter) Flush() error

Flush submits a snapshot of metrics to Datadog

func (*Reporter) FlushWithInterval

func (r *Reporter) FlushWithInterval(i time.Duration)

FlushWithInterval repeatedly submits a snapshot of metrics to Datadog at an interval specified by i

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL