github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/metrics/statsd.md (about)

     1  ---
     2  title: statsd
     3  type: metrics
     4  status: stable
     5  ---
     6  
     7  <!--
     8       THIS FILE IS AUTOGENERATED!
     9  
    10       To make changes please edit the contents of:
    11       lib/metrics/statsd.go
    12  -->
    13  
    14  import Tabs from '@theme/Tabs';
    15  import TabItem from '@theme/TabItem';
    16  
    17  
    18  Pushes metrics using the [StatsD protocol](https://github.com/statsd/statsd).
    19  Supported tagging formats are 'legacy', 'none', 'datadog' and 'influxdb'.
    20  
    21  ```yaml
    22  # Config fields, showing default values
    23  metrics:
    24    statsd:
    25      prefix: benthos
    26      path_mapping: ""
    27      address: localhost:4040
    28      flush_period: 100ms
    29      tag_format: legacy
    30  ```
    31  
    32  The underlying client library has recently been updated in order to support
    33  tagging. The tag format 'legacy' is default and causes Benthos to continue using
    34  the old library in order to preserve backwards compatibility.
    35  
    36  The legacy library aggregated timing metrics, so dashboards and alerts may need
    37  to be updated when migrating to the new library.
    38  
    39  The 'network' field is deprecated and scheduled for removal. If you currently
    40  rely on sending Statsd metrics over TCP and want it to be supported long term
    41  please [raise an issue](https://github.com/Jeffail/benthos/issues).
    42  
    43  ## Fields
    44  
    45  ### `prefix`
    46  
    47  A string prefix to add to all metrics.
    48  
    49  
    50  Type: `string`  
    51  Default: `"benthos"`  
    52  
    53  ### `path_mapping`
    54  
    55  An optional [Bloblang mapping](/docs/guides/bloblang/about) that allows you to rename or prevent certain metrics paths from being exported. When metric paths are created, renamed and dropped a trace log is written, enabling TRACE level logging is therefore a good way to diagnose path mappings.
    56  
    57  
    58  Type: `string`  
    59  Default: `""`  
    60  
    61  ```yaml
    62  # Examples
    63  
    64  path_mapping: this.replace("input", "source").replace("output", "sink")
    65  
    66  path_mapping: |-
    67    if ![
    68      "benthos.input.received",
    69      "benthos.input.latency",
    70      "benthos.output.sent"
    71    ].contains(this) { deleted() }
    72  ```
    73  
    74  ### `address`
    75  
    76  The address to send metrics to.
    77  
    78  
    79  Type: `string`  
    80  Default: `"localhost:4040"`  
    81  
    82  ### `flush_period`
    83  
    84  The time interval between metrics flushes.
    85  
    86  
    87  Type: `string`  
    88  Default: `"100ms"`  
    89  
    90  ### `tag_format`
    91  
    92  Metrics tagging is supported in a variety of formats. The format 'legacy' is a special case that forces Benthos to use a deprecated library for backwards compatibility.
    93  
    94  
    95  Type: `string`  
    96  Default: `"legacy"`  
    97  Options: `none`, `datadog`, `influxdb`, `legacy`.
    98  
    99