statsd

Params

FieldTypeDescription
addressstringAddress of the statsd server, e.g. localhost:8125
prefixstringMetric prefix, do not specify for no prefix
flushDurationDurationFlush Interval controls the maximum amount of time between sending metrics to the statsd collection server. Metrics are reported when either flushBytes is full or flushInterval time has elapsed since the last report.
flushBytesint32Maximum UDP packet size to send; if not specified defaults to 512 bytes. If the statsd server is running on the same (private) network 1432 bytes is recommended for better performance.
samplingRatefloatChance that any particular metric is sampled when incremented; can take the range [0, 1], defaults to 1 if unspecified.
metricNameTemplateStringsrepeated map<string, string>

Map of metric name -> template string; the template will be filled with values from the metric's labels and the resulting string will be used as the statsd metric name. This allows easier creation of statsd metrics like actionName-responseCode. The template strings must conform to go's text/template syntax. For the example of actionName-responseCode, we use the template: \{\{.apiMethod\}\}-\{\{.responseCode\}\}

If a metric's name is not in the map then the exported statsd metric name will be exactly the metric's name.