datadog

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package datadog implements the metric registry interface for a Datadog provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricRegistry

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

MetricRegistry will implements a MetricRegistry for sending metrics to Datadog via dogstatsd.

func NewMetricRegistry

func NewMetricRegistry(addr string, prefix string, pollFrequency time.Duration) (*MetricRegistry, error)

NewMetricRegistry will create a new Datadog MetricRegistry. This registry reports metrics to datadog using the datadog dogstatsd forwarding.

func NewMetricRegistryWithClient added in v0.5.8

func NewMetricRegistryWithClient(
	client *dogstatsd.Client,
	prefix string,
	pollFrequency time.Duration,
) (*MetricRegistry, error)

NewMetricRegistryWithClient will create a new Datadog MetricRegistry with the provided client instead. This registry reports metrics to datadog using the datadog dogstatsd forwarding.

func (*MetricRegistry) RegisterCount

func (r *MetricRegistry) RegisterCount(
	ID string,
	tags ...string,
) core.MetricSampleListener

RegisterCount will register a count sample to this registry

func (*MetricRegistry) RegisterDistribution

func (r *MetricRegistry) RegisterDistribution(
	ID string,
	tags ...string,
) core.MetricSampleListener

RegisterDistribution will register a distribution sample to this registry

func (*MetricRegistry) RegisterGauge

func (r *MetricRegistry) RegisterGauge(
	ID string,
	supplier core.MetricSupplier,
	tags ...string,
)

RegisterGauge will register a gauge sample to this registry

func (*MetricRegistry) RegisterTiming

func (r *MetricRegistry) RegisterTiming(
	ID string,
	tags ...string,
) core.MetricSampleListener

RegisterTiming will register a timing distribution sample to this registry

func (*MetricRegistry) Start

func (r *MetricRegistry) Start()

Start will start the metric registry polling

func (*MetricRegistry) Stop

func (r *MetricRegistry) Stop()

Stop will gracefully stop the registry

Jump to

Keyboard shortcuts

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