dogstatsd

package
v0.0.0-...-cbcc489 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

package dogstatsd

This package is responsible for receiving metrics from external software over UDP or UDS. Every package has to follow the Dogstatsd format: http://docs.datadoghq.com/guides/dogstatsd/.

Metrics will be sent to the aggregator just like regular metrics from checks. This mean that aggregator and forwarder configuration will also inpact Dogstatsd.

Usage example:

// you must first initialize the aggregator, see aggregator.InitAggregator

// This will return an already running statd server ready to receive metrics
statsd, err := dogstatsd.NewServer(aggregatorInstance.GetBufferedChannels())

// ...

statsd.Stop()

Dogstatsd implementation documentation (packets.Buffer, StringInterner, ...) is available in docs/dogstatsd/internals.md.

Details on existing Dogstatsd internals tuning fields are available in docs/dogstatsd/configuration.md.

[Experimental] Dogstatsd protocol 1.1

This feature is experimental for now and could change or be remove in futur release.

Starting with agent 7.25.0/6.25.0 Dogstatsd datagram can contain multiple values using the : delimiter.

For example, this payload contains 3 values (1.5, 20, and 30) for the metric my_metric:

my_metric:1.5:20:30|h|#tag1,tag2

All metric types except set support this, since : could be in the value of a set. Sets are now being aggregated on the client side, so this is not an issue.

Most official Dogstatsd clients now support client-side aggregation for metrics type outside histograms and distributions. This evolution in the protocol allows clients to buffer histogram and distribution values and send them in fewer payload to the agent (providing a behavior close to client-side aggregation for those types).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientBundle = fxutil.Bundle(
	statsd.Module(),
)

ClientBundle defines the fx options for this bundle.

Functions

func Bundle

func Bundle(params server.Params) fxutil.BundleOptions

Bundle defines the fx options for this bundle.

Types

This section is empty.

Directories

Path Synopsis
Package listeners implements the StatsdListener interfaces.
Package listeners implements the StatsdListener interfaces.
Package pidmap implements a component for tracking pid and containerID relations
Package pidmap implements a component for tracking pid and containerID relations
pidmapimpl
Package pidmapimpl implements a component for storing pid - containerID relations
Package pidmapimpl implements a component for storing pid - containerID relations
replay
def
Package replay is a component to run the dogstatsd capture/replay
Package replay is a component to run the dogstatsd capture/replay
fx
fx-noop
Package fx provides an fx module for the noop implementation.
Package fx provides an fx module for the noop implementation.
impl-noop
Package replayimpl implements a no-op version of the component
Package replayimpl implements a no-op version of the component
Package dogstatsd implements DogStatsD.
Package dogstatsd implements DogStatsD.
Package serverdebug implements a component to run the dogstatsd server debug
Package serverdebug implements a component to run the dogstatsd server debug
serverdebugimpl
Package serverdebugimpl implements a component to run the dogstatsd server debug
Package serverdebugimpl implements a component to run the dogstatsd server debug
Package statsd implements a component to get a statsd client.
Package statsd implements a component to get a statsd client.
Package status implements the core status component information provider interface
Package status implements the core status component information provider interface
statusimpl
Package statusimpl implements the status component interface
Package statusimpl implements the status component interface

Jump to

Keyboard shortcuts

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