# README
Overview
Package statsd
provides a Go dogstatsd client. Dogstatsd extends Statsd, adding tags
and histograms.
# Packages
Package mock_statsd is a generated GoMock package.
# Functions
CloneWithExtraOptions create a new Client with extra options.
No description provided by the author
New returns a pointer to a new Client given an addr in the format "hostname:port" for UDP, "unix:///path/to/socket" for UDS or "\\.\pipe\path\to\pipe" for Windows Named Pipes.
NewDirect returns a pointer to a new ClientDirect given an addr in the format "hostname:port" for UDP, "unix:///path/to/socket" for UDS or "\\.\pipe\path\to\pipe" for Windows Named Pipes.
No description provided by the author
NewEvent creates a new event with the given title and text.
NewServiceCheck creates a new serviceCheck with the given name and status.
NewWithWriter creates a new Client with given writer.
WithAggregationInterval sets the interval at which aggregated metrics are flushed.
WithBufferFlushInterval sets the interval after which the current buffer is flushed.
WithBufferPoolSize sets the size of the pool of buffers used to serialized metrics, events and service_checks.
WithChannelMode make the client use channels to receive metrics
This determines how the client receive metrics from the app (for example when calling the `Gauge()` method).
WithChannelModeBufferSize sets the size of the channel holding incoming metrics when WithChannelMode is used.
WithChannelModeErrorsWhenFull makes the client return an error when the channel is full.
WithClientSideAggregation enables client side aggregation for Gauges, Counts and Sets.
WithConnectTimeout sets the timeout for network connection with the Agent, after this interval the connection attempt is aborted.
WithContainerID allows passing the container ID, this will be used by the Agent to enrich metrics with container tags.
WithErrorHandler sets a function that will be called when an error occurs.
WithExtendedClientSideAggregation enables client side aggregation for all types.
WithMaxBytesPerPayload sets the maximum number of bytes a single payload can contain.
WithMaxMessagesPerPayload sets the maximum number of metrics, events and/or service checks that a single payload can contain.
WithMaxSamplesPerContext limits the number of sample for metric types that require multiple samples to be send over statsd to the agent, such as distributions or timings.
WithMutexMode will use mutex to receive metrics from the app through the API.
WithNamespace sets a string to be prepend to all metrics, events and service checks name.
WithOriginDetection enables the client origin detection.
WithoutChannelModeErrorsWhenFull makes the client not return an error when the channel is full.
WithoutClientSideAggregation disables client side aggregation.
WithoutOriginDetection disables the client origin detection.
WithoutTelemetry disables the client telemetry.
WithSenderQueueSize sets the size of the sender queue in number of buffers.
WithTags sets global tags to be applied to every metrics, events and service checks.
WithTelemetryAddr sets a different address for telemetry metrics.
WithWorkersCount sets the number of workers that will be used to serialized data.
WithWriteTimeout sets the timeout for network communication with the Agent, after this interval a payload is dropped.
# Constants
Critical is the "critical" ServiceCheck status.
DefaultMaxAgentPayloadSize is the default maximum payload size the agent
can receive.
DefaultUDPBufferPoolSize is the default size of the buffer pool for UDP clients.
DefaultUDSBufferPoolSize is the default size of the buffer pool for UDS clients.
ErrNoClient is returned if statsd reporting methods are invoked on a nil client.
Error is the "error" AlertType for events.
Info is the "info" AlertType for events.
InvalidTimestamp is returned if a provided timestamp is invalid.
Low is the "low" Priority for events.
MaxUDPPayloadSize defines the maximum payload size for a UDP datagram.
Normal is the "normal" Priority for events.
Ok is the "ok" ServiceCheck status.
OptimalUDPPayloadSize defines the optimal payload size for a UDP datagram, 1432 bytes
is optimal for regular networks with an MTU of 1500 so datagrams don't get
fragmented.
Success is the "success" AlertType for events.
UnixDatagramAddressPrefix holds the prefix to use to enable Unix Domain Socket
datagram traffic instead of UDP.
UnixAddressPrefix holds the prefix to use to enable Unix Domain Socket
traffic instead of UDP.
UnixAddressStreamPrefix holds the prefix to use to enable Unix Domain Socket
stream traffic instead of UDP.
Unknown is the "unknown" ServiceCheck status.
Warn is the "warning" ServiceCheck status.
Warning is the "warning" AlertType for events.
WindowsPipeAddressPrefix holds the prefix to use to enable Windows Named Pipes
traffic instead of UDP.
# Variables
No description provided by the author
# Structs
A Client is a handle for sending messages to dogstatsd.
ClientDirect is an *experimental* statsd client that gives direct access to some dogstatsd features.
No description provided by the author
No description provided by the author
An Event is an object that can be posted to your DataDog event stream.
MessageTooLongError is an error returned when a sample, event or service check is too large once serialized.
NoOpClient is a statsd client that does nothing.
NoOpClientDirect implements ClientDirectInterface and does nothing.
Options contains the configuration options for a client.
A ServiceCheck is an object that contains status of DataDog service check.
Telemetry represents internal metrics about the client behavior since it started.
# Interfaces
No description provided by the author
ClientInterface is an interface that exposes the common client functions for the purpose of being able to provide a no-op client or even mocking.
No description provided by the author
# Type aliases
No description provided by the author
EventAlertType is the alert type for events.
EventPriority is the event priority for events.
Option is a client option.
ServiceCheckStatus support.