Package io.micrometer.statsd
Interface StatsdConfig
- All Superinterfaces:
io.micrometer.core.instrument.config.MeterRegistryConfig
public interface StatsdConfig
extends io.micrometer.core.instrument.config.MeterRegistryConfig
Configuration for
StatsdMeterRegistry
.-
Field Summary
Fields Modifier and Type Field Description static StatsdConfig
DEFAULT
Accept configuration defaults -
Method Summary
Modifier and Type Method Description default boolean
buffered()
default boolean
enabled()
default StatsdFlavor
flavor()
default java.lang.String
host()
default int
maxPacketLength()
Keep the total length of the payload within your network's MTU.default java.time.Duration
pollingFrequency()
Determines how often gauges will be polled.default int
port()
default java.lang.String
prefix()
default StatsdProtocol
protocol()
default boolean
publishUnchangedMeters()
default int
queueSize()
Deprecated.No longer configurable and unbounded queue will be always used instead.default java.time.Duration
step()
default io.micrometer.core.instrument.config.validate.Validated<?>
validate()
Methods inherited from interface io.micrometer.core.instrument.config.MeterRegistryConfig
get, requireValid
-
Field Details
-
DEFAULT
Accept configuration defaults
-
-
Method Details
-
prefix
default java.lang.String prefix()- Specified by:
prefix
in interfaceio.micrometer.core.instrument.config.MeterRegistryConfig
-
flavor
- Returns:
- Choose which variant of the StatsD line protocol to use.
-
enabled
default boolean enabled()- Returns:
true
if publishing is enabled. Default istrue
.
-
host
default java.lang.String host()- Returns:
- The host name of the StatsD agent.
-
port
default int port()- Returns:
- The port of the StatsD agent.
-
protocol
- Returns:
- the protocol of the connection to the agent
- Since:
- 1.2.0
-
maxPacketLength
default int maxPacketLength()Keep the total length of the payload within your network's MTU. There is no single good value to use, but here are some guidelines for common network scenarios: 1. Fast Ethernet (1432) - This is most likely for Intranets. 2. Gigabit Ethernet (8932) - Jumbo frames can make use of this feature much more efficient. 3. Commodity Internet (512) - If you are routing over the internet a value in this range will be reasonable. You might be able to go higher, but you are at the mercy of all the hops in your route.- Returns:
- The max length of the payload.
-
pollingFrequency
default java.time.Duration pollingFrequency()Determines how often gauges will be polled. When a gauge is polled, its value is recalculated. If the value has changed, it is sent to the StatsD server.- Returns:
- The polling frequency.
-
queueSize
@Deprecated default int queueSize()Deprecated.No longer configurable and unbounded queue will be always used instead.Governs the maximum size of the queue of items waiting to be sent to a StatsD agent over UDP.- Returns:
- Maximum queue size.
-
step
default java.time.Duration step()- Returns:
- The step size to use in computing windowed statistics like max. The default is 1 minute. To get the most out of these statistics, align the step interval to be close to your scrape interval.
-
publishUnchangedMeters
default boolean publishUnchangedMeters()- Returns:
true
if unchanged meters should be published to the StatsD server. Default istrue
.
-
buffered
default boolean buffered()- Returns:
true
if measurements should be buffered before sending to the StatsD server. Default istrue
. Measurements will be buffered until reaching the max packet length, or until the polling frequency is reached.
-
validate
default io.micrometer.core.instrument.config.validate.Validated<?> validate()- Specified by:
validate
in interfaceio.micrometer.core.instrument.config.MeterRegistryConfig
-