pub struct DogStatsDConfiguration {Show 39 fields
pub default_hostname: MetaString,
pub buffer_size: usize,
pub buffer_count: usize,
pub buffer_count_max: usize,
pub workers_count: usize,
pub port: u16,
pub socket_receive_buffer_size: usize,
pub tcp_port: u16,
pub statsd_forward_host: Option<MetaString>,
pub statsd_forward_port: u16,
pub socket_path: Option<String>,
pub socket_stream_path: Option<String>,
pub stream_log_too_big: bool,
pub pipe_name: Option<String>,
pub windows_pipe_security_descriptor: String,
pub disable_verbose_logs: bool,
pub eol_required: Vec<String>,
pub bind_host: Option<String>,
pub non_local_traffic: bool,
pub autoscale_udp_listeners: bool,
pub allow_context_heap_allocations: bool,
pub no_aggregation_pipeline_support: bool,
pub context_string_interner_entry_count: u64,
pub context_string_interner_size_bytes: Option<ByteSize>,
pub cached_contexts_limit: usize,
pub cached_tagsets_limit: usize,
pub context_expiry_seconds: u64,
pub permissive_decoding: bool,
pub minimum_sample_rate: f64,
pub enable_payloads: EnablePayloadsConfiguration,
pub origin_enrichment: OriginEnrichmentConfiguration,
pub origin_telemetry_enabled: bool,
pub workload_provider: Option<Arc<dyn WorkloadProvider + Send + Sync>>,
pub capture_entity_resolver: Option<Arc<dyn CaptureEntityResolver + Send + Sync>>,
pub additional_tags: Vec<String>,
pub capture_path: PathBuf,
pub capture_depth: usize,
pub capture_control: DogStatsDCaptureControl,
pub replay_control: DogStatsDReplayControl,
}Expand description
DogStatsD source.
Accepts metrics over TCP, UDP, or Unix Domain Sockets in the StatsD/DogStatsD format.
Fields§
§default_hostname: MetaStringHostname used when DogStatsD metrics do not carry an explicit host: tag.
buffer_size: usizeThe size of the buffer used to receive messages into, in bytes.
Payloads can’t exceed this size, or they will be truncated, leading to discarded messages.
buffer_count: usizeThe number of message buffers to allocate up front.
This is the baseline pool size allocated at startup. The pool then grows on demand up to
buffer_count_max as active stream connections and datagram queues need additional buffers.
Higher values allocate more memory at startup but reduce on-demand allocations during bursts.
buffer_count_max: usizeThe maximum number of message buffers to allocate overall.
The global pool starts at buffer_count buffers and grows on demand up to this limit. Active stream
connections use these buffers for reads, while connectionless listeners use them to queue received packets for
decoding. Increasing this value lets datagram listeners absorb larger bursts at the cost of up to one additional
buffer_size allocation per buffer. This limit bounds payload buffers, but not per-connection task and channel
bookkeeping. After a short grace period without pool growth, ADP releases idle buffers until the pool returns to
buffer_count.
The pool never holds fewer buffers than buffer_count, so a value below the baseline is treated as equal to it.
workers_count: usizeThe number of workers in the global pool that decodes connectionless DogStatsD packets.
If set to 0, the worker count is derived from the available vCPUs using the Core Agent’s default formula.
Positive values force an exact worker count. Higher values can improve throughput when decoding is CPU-bound,
but also increase task scheduling and per-worker event buffering overhead.
port: u16The port to listen on in UDP mode.
If set to 0, UDP isn’t used.
socket_receive_buffer_size: usizeThe size of the receive buffer requested for each DogStatsD socket, in bytes.
Applies to the UDP, TCP, and UDS sockets alike. If set to 0, the OS default is used.
tcp_port: u16The port to listen on in TCP mode.
If set to 0, TCP isn’t used.
statsd_forward_host: Option<MetaString>The host to forward framed DogStatsD messages to over UDP.
Forwarding is enabled only when this value is set and statsd_forward_port is non-zero. Setup failures
are logged, and send failures are tracked through telemetry.
statsd_forward_port: u16The port to forward framed DogStatsD messages to over UDP.
Forwarding is enabled only when this value is non-zero and statsd_forward_host is set.
socket_path: Option<String>The Unix domain socket path to listen on, in datagram mode.
If not set, UDS (in datagram mode) isn’t used.
socket_stream_path: Option<String>The Unix domain socket path to listen on, in stream mode.
If not set, UDS (in stream mode) isn’t used.
stream_log_too_big: boolControls whether ADP logs oversized DogStatsD stream frames.
When set to true, ADP emits a warning when a UDS stream frame exceeds the
configured DogStatsD buffer size. The frame is still rejected either way.
Enable this when diagnosing clients that send oversized UDS stream frames.
pipe_name: Option<String>The Windows named pipe name to listen on.
If set, ADP listens for DogStatsD stream traffic on \\.\pipe\<name> on Windows.
The listener is unsupported on non-Windows platforms.
windows_pipe_security_descriptor: StringWindows named pipe security descriptor.
This SDDL descriptor is applied when creating the named pipe listener.
disable_verbose_logs: boolWhether ADP lowers DogStatsD parse-failure logs to debug level.
When set to true, invalid metrics, events, and service checks still increment decode-failure telemetry, but
their parse-failure logs are emitted at debug level instead of warning level. Enable this to suppress noisy
parse-error logs from misbehaving clients.
eol_required: Vec<String>Listener types that require DogStatsD messages to be newline-terminated.
Valid values are udp, uds, and named_pipe. Invalid values are ignored.
An empty list accepts the final message without a newline.
bind_host: Option<String>The host address to bind DogStatsD UDP and TCP listeners to.
When set, UDP and TCP listeners bind to this address. Accepts either an IP literal (for example,
192.168.1.50, ::1) or a hostname that resolves via DNS (for example, agent.internal).
Ignored when non_local_traffic is true, and binds to 127.0.0.1 when unset.
non_local_traffic: boolWhether or not to listen for non-local traffic.
If set to true, the UDP and TCP listeners bind to 0.0.0.0 and accept traffic from any interface. Otherwise,
they bind to bind_host, or 127.0.0.1 if bind_host isn’t set.
autoscale_udp_listeners: boolWhether to autoscale UDP stream handlers using SO_REUSEPORT.
When enabled on Linux, the DogStatsD source binds multiple UDP sockets to the configured port with
SO_REUSEPORT, allowing the kernel to load-balance incoming datagrams across independent stream handler
tasks. The number of sockets scales with available vCPUs: one stream handler base, plus one additional
per 8 vCPUs, capped at 4 total.
Has no effect on non-Linux platforms because SO_REUSEPORT doesn’t provide kernel-level load balancing
there; a warning is logged at startup if enabled outside of Linux.
Enable this on multi-vCPU Linux deployments where UDP DogStatsD throughput is bottlenecked on a single receive task.
allow_context_heap_allocations: boolWhether or not to allow heap allocations when resolving contexts.
When resolving contexts during parsing, the metric name and tags are interned to reduce memory usage. The
interner has a fixed size, however, which means some strings can fail to be interned if the interner is full.
When set to true, we allow these strings to be allocated on the heap like normal, but this can lead to
increased (unbounded) memory usage. When set to false, if the metric name and all of its tags can’t be
interned, the metric is skipped.
no_aggregation_pipeline_support: boolWhether or not to enable support for no-aggregation pipelines.
When enabled, this influences how metrics are parsed, specifically around user-provided metric timestamps. When metric timestamps are present, it’s used as a signal to any aggregation transforms that the metric shouldn’t be aggregated.
context_string_interner_entry_count: u64Number of entries for the string interner, as interpreted by the Core Datadog Agent.
When context_string_interner_size_bytes isn’t set, this value is multiplied by 512 bytes per entry to
derive the interner byte size. This provides backwards compatibility for customers migrating configurations
from the Core Agent, where this setting represents an entry count rather than a byte size.
context_string_interner_size_bytes: Option<ByteSize>Total size of the string interner used for contexts, in bytes.
When set, this takes priority over context_string_interner_entry_count. This controls the amount of memory
that can be used to intern metric names and tags. If the interner is full, metrics with contexts that haven’t
already been resolved may or may not be dropped, depending on the value of allow_context_heap_allocations.
cached_contexts_limit: usizeThe maximum number of cached contexts to allow.
This is the maximum number of resolved contexts that can be cached at any given time. This limit doesn’t affect the total number of contexts that can be alive at any given time, which is dependent on the interner capacity and whether or not heap allocations are allowed.
The maximum number of cached tagsets to allow.
This is the maximum number of resolved tagsets that can be cached at any given time. This limit doesn’t affect the total number of tagsets that can be alive at any given time, which is dependent on the interner capacity and whether or not heap allocations are allowed.
context_expiry_seconds: u64The number of seconds after which cached contexts will expire.
Higher values allow for more effective caching for sparse metrics at the cost of increased memory usage.
permissive_decoding: boolWhether or not to enable permissive mode in the decoder.
Permissive mode allows the decoder to relax its strictness around the allowed payloads, which lets it match the decoding behavior of the Datadog Agent.
minimum_sample_rate: f64The minimum sample rate allowed for metrics.
When metrics are sent with a sample rate lower than this value then it will be clamped to this value. This is
done in order to ensure an upper bound on how many equivalent samples are tracked for the metric, as high sample
rates (very small numbers, such as 0.00000001) can lead to large memory growth.
A warning log will be emitted when clamping occurs, as this represents an effective loss of metric samples.
enable_payloads: EnablePayloadsConfigurationWhich payload types to forward to the backend.
origin_enrichment: OriginEnrichmentConfigurationConfiguration related to origin detection and enrichment.
origin_telemetry_enabled: boolWhether to break down DogStatsD processed-metric telemetry by UDS origin.
When enabled, metric-message dogstatsd.processed telemetry includes an origin label derived from the
sender’s UDS origin. This can add one telemetry series per origin and should primarily be used for diagnostics.
workload_provider: Option<Arc<dyn WorkloadProvider + Send + Sync>>Workload provider to utilize for origin enrichment.
Detected origins are only resolved to workload tags when a provider is set. Origin detection itself is
controlled by origin_enrichment.
capture_entity_resolver: Option<Arc<dyn CaptureEntityResolver + Send + Sync>>Resolver to use for mapping live sender PIDs to container entities before deferred processing.
This resolver pins the sender entity while socket credentials are current so origin enrichment and traffic capture do not resolve a stale or reused PID later. It is set separately from the workload provider because it only needs a narrow live-PID lookup.
Additional tags to add to all metrics.
These are sorted and deduplicated before use, so callers may append tags required by the running environment.
capture_path: PathBufThe directory where DogStatsD capture files are written by default.
When set to an empty path, callers must provide an explicit capture path when starting a capture session.
capture_depth: usizeThe maximum number of captured packets that can be queued for persistence.
This controls the depth of the in-process capture queue. Values below 1024 are raised to 1024 before the
capture writer starts, preventing a zero-depth rendezvous channel from serializing DogStatsD stream handlers
behind capture persistence.
capture_control: DogStatsDCaptureControlControl surface that starts and stops DogStatsD traffic capture.
This is runtime wiring rather than configuration: the source binds the capture it creates to this handle, so the caller creates the handle and keeps a clone to serve the capture API.
replay_control: DogStatsDReplayControlControl surface that starts and stops DogStatsD traffic replay.
This is runtime wiring rather than configuration: the source binds the captured tagger to this handle, so the caller creates the handle and keeps a clone to serve the replay API.
Trait Implementations§
Source§impl MemoryBounds for DogStatsDConfiguration
impl MemoryBounds for DogStatsDConfiguration
Source§fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
fn specify_bounds(&self, builder: &mut MemoryBoundsBuilder<'_>)
Source§impl SourceBuilder for DogStatsDConfiguration
impl SourceBuilder for DogStatsDConfiguration
Source§fn build<'life0, 'async_trait>(
&'life0 self,
context: BuildContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Source + Send>, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn build<'life0, 'async_trait>(
&'life0 self,
context: BuildContext,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Source + Send>, GenericError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn outputs(&self) -> &[OutputDefinition<EventType>]
fn outputs(&self) -> &[OutputDefinition<EventType>]
Auto Trait Implementations§
impl Freeze for DogStatsDConfiguration
impl !RefUnwindSafe for DogStatsDConfiguration
impl Send for DogStatsDConfiguration
impl Sync for DogStatsDConfiguration
impl Unpin for DogStatsDConfiguration
impl !UnwindSafe for DogStatsDConfiguration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more