Documentation ¶
Overview ¶
Package metricsclient provides a statsd.ClientInterface implementation to datadog exporter and datadog connector
Index ¶
- Constants
- func InitializeMetricClient(mp metric.MeterProvider, source string) statsd.ClientInterface
- type StatsdClientWrapper
- func (m *StatsdClientWrapper) Close() error
- func (m *StatsdClientWrapper) Count(name string, value int64, tags []string, rate float64) error
- func (m *StatsdClientWrapper) CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error
- func (m *StatsdClientWrapper) Decr(name string, tags []string, rate float64) error
- func (m *StatsdClientWrapper) Distribution(name string, value float64, tags []string, rate float64) error
- func (m *StatsdClientWrapper) Event(e *ddgostatsd.Event) error
- func (m *StatsdClientWrapper) Flush() error
- func (m *StatsdClientWrapper) Gauge(name string, value float64, tags []string, rate float64) error
- func (m *StatsdClientWrapper) GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error
- func (m *StatsdClientWrapper) GetTelemetry() ddgostatsd.Telemetry
- func (m *StatsdClientWrapper) Histogram(name string, value float64, tags []string, rate float64) error
- func (m *StatsdClientWrapper) Incr(name string, tags []string, rate float64) error
- func (m *StatsdClientWrapper) IsClosed() bool
- func (m *StatsdClientWrapper) ServiceCheck(sc *ddgostatsd.ServiceCheck) error
- func (m *StatsdClientWrapper) Set(name string, value string, tags []string, rate float64) error
- func (m *StatsdClientWrapper) SetDelegate(cl ddgostatsd.ClientInterface)
- func (m *StatsdClientWrapper) SimpleEvent(title, text string) error
- func (m *StatsdClientWrapper) SimpleServiceCheck(name string, status ddgostatsd.ServiceCheckStatus) error
- func (m *StatsdClientWrapper) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error
- func (m *StatsdClientWrapper) Timing(name string, value time.Duration, tags []string, rate float64) error
Constants ¶
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
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
func (m *StatsdClientWrapper) Event(e *ddgostatsd.Event) error
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
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
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.