--- title: StatsD description: Adapter to deliver metrics to a StatsD backend. location: https://istio.io/docs/reference/config/policy-and-telemetry/adapters/statsd.html layout: protoc-gen-docs generator: protoc-gen-docs supported_templates: metric aliases: - /docs/reference/config/adapters/statsd.html number_of_entries: 3 ---

The `statsd` adapter enables Istio to deliver metric data to a StatsD monitoring backend.

This adapter supports the metric template.

## Params

Configuration format for the `statsd` adapter.

Field | Type | Description | Required
--- | --- | --- | ---
`address` | `string` | Address of the statsd server, e.g. localhost:8125 | No
`prefix` | `string` | Metric prefix, do not specify for no prefix | No
`flushDuration` | `Duration` | FlushDuration controls the maximum amount of time between sending metrics to the statsd collection server. Metrics are reported when either flushbytes is full or flushduration time has elapsed since the last report. | No
`flushBytes` | `int32` | Maximum 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. | No
`samplingRate` | `float` | Chance that any particular metric is sampled when incremented; can take the range [0, 1], defaults to 1 if unspecified. | No
`metrics` | `map<string, MetricInfo>` | Map of metric name -> info. If a metric’s name is not in the map then the metric will not be exported to statsd. | No

## Params.MetricInfo

Describes how to represent this metric in statsd

Field | Type | Description | Required
--- | --- | --- | ---
`type` | `Type` |  | No
`nameTemplate` | `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 `action_name-response_code`. The template strings must conform to go’s text/template syntax. For the example of `action_name-response_code`, we use the template: `{{.apiMethod}}-{{.responseCode}}` If name_template is the empty string the Istio metric name will be used for statsd metric’s name. | No

## Params.MetricInfo.Type

The type of metric.

Name | Description
--- | ---
`UNKNOWN` |
`COUNTER` |
`GAUGE` |
`DISTRIBUTION` |