metricsclient

package module
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package metricsclient provides a statsd.ClientInterface implementation to datadog exporter and datadog connector

Index

Constants

View Source
const (
	// ExporterSourceTag is the source tag for Datadog exporter
	ExporterSourceTag = "datadogexporter"
	// ConnectorSourceTag is the source tag for Datadog connector
	ConnectorSourceTag = "datadogconnector"
)

Variables

This section is empty.

Functions

func InitializeMetricClient

func InitializeMetricClient(mp metric.MeterProvider, source string) statsd.ClientInterface

InitializeMetricClient using a meter provider.

Types

type StatsdClientWrapper added in v0.56.0

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

StatsdClientWrapper is an implementation of ddgostatsd.ClientInterface that delegates all operations to the encompassed ddgostatsd.ClientInterface

func NewStatsdClientWrapper added in v0.56.0

func NewStatsdClientWrapper(cl ddgostatsd.ClientInterface) *StatsdClientWrapper

NewStatsdClientWrapper returns a StatsdClientWrapper

func (*StatsdClientWrapper) Close added in v0.56.0

func (m *StatsdClientWrapper) Close() error

Close the client connection.

func (*StatsdClientWrapper) Count added in v0.56.0

func (m *StatsdClientWrapper) Count(name string, value int64, tags []string, rate float64) error

Count tracks how many times something happened per second.

func (*StatsdClientWrapper) CountWithTimestamp added in v0.56.0

func (m *StatsdClientWrapper) CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error

CountWithTimestamp tracks how many times something happened at the given second.

func (*StatsdClientWrapper) Decr added in v0.56.0

func (m *StatsdClientWrapper) Decr(name string, tags []string, rate float64) error

Decr is just Count of -1

func (*StatsdClientWrapper) Distribution added in v0.56.0

func (m *StatsdClientWrapper) Distribution(name string, value float64, tags []string, rate float64) error

Distribution tracks the statistical distribution of a set of values across your infrastructure.

func (*StatsdClientWrapper) Event added in v0.56.0

Event sends the provided Event.

func (*StatsdClientWrapper) Flush added in v0.56.0

func (m *StatsdClientWrapper) Flush() error

Flush forces a flush of all the queued dogstatsd payloads.

func (*StatsdClientWrapper) Gauge added in v0.56.0

func (m *StatsdClientWrapper) Gauge(name string, value float64, tags []string, rate float64) error

Gauge measures the value of a metric at a particular time.

func (*StatsdClientWrapper) GaugeWithTimestamp added in v0.56.0

func (m *StatsdClientWrapper) GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error

GaugeWithTimestamp measures the value of a metric at a given time.

func (*StatsdClientWrapper) GetTelemetry added in v0.56.0

func (m *StatsdClientWrapper) GetTelemetry() ddgostatsd.Telemetry

GetTelemetry return the telemetry metrics for the client since it started.

func (*StatsdClientWrapper) Histogram added in v0.56.0

func (m *StatsdClientWrapper) Histogram(name string, value float64, tags []string, rate float64) error

Histogram tracks the statistical distribution of a set of values on each host.

func (*StatsdClientWrapper) Incr added in v0.56.0

func (m *StatsdClientWrapper) Incr(name string, tags []string, rate float64) error

Incr is just Count of 1

func (*StatsdClientWrapper) IsClosed added in v0.56.0

func (m *StatsdClientWrapper) IsClosed() bool

IsClosed returns if the client has been closed.

func (*StatsdClientWrapper) ServiceCheck added in v0.56.0

func (m *StatsdClientWrapper) ServiceCheck(sc *ddgostatsd.ServiceCheck) error

ServiceCheck sends the provided ServiceCheck.

func (*StatsdClientWrapper) Set added in v0.56.0

func (m *StatsdClientWrapper) Set(name string, value string, tags []string, rate float64) error

Set counts the number of unique elements in a group.

func (*StatsdClientWrapper) SetDelegate added in v0.56.0

func (m *StatsdClientWrapper) SetDelegate(cl ddgostatsd.ClientInterface)

SetDelegate sets the delegate statsd client in this StatsdClientWrapper

func (*StatsdClientWrapper) SimpleEvent added in v0.56.0

func (m *StatsdClientWrapper) SimpleEvent(title, text string) error

SimpleEvent sends an event with the provided title and text.

func (*StatsdClientWrapper) SimpleServiceCheck added in v0.56.0

func (m *StatsdClientWrapper) SimpleServiceCheck(name string, status ddgostatsd.ServiceCheckStatus) error

SimpleServiceCheck sends an serviceCheck with the provided name and status.

func (*StatsdClientWrapper) TimeInMilliseconds added in v0.56.0

func (m *StatsdClientWrapper) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error

TimeInMilliseconds sends timing information in milliseconds.

func (*StatsdClientWrapper) Timing added in v0.56.0

func (m *StatsdClientWrapper) Timing(name string, value time.Duration, tags []string, rate float64) error

Timing sends timing information, it is an alias for TimeInMilliseconds

Jump to

Keyboard shortcuts

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