github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/metrics/stdout.md (about) 1 --- 2 title: stdout 3 type: metrics 4 status: beta 5 --- 6 7 <!-- 8 THIS FILE IS AUTOGENERATED! 9 10 To make changes please edit the contents of: 11 lib/metrics/stdout.go 12 --> 13 14 import Tabs from '@theme/Tabs'; 15 import TabItem from '@theme/TabItem'; 16 17 :::caution BETA 18 This component is mostly stable but breaking changes could still be made outside of major version releases if a fundamental problem with the component is found. 19 ::: 20 21 Prints aggregated metrics as JSON objects to stdout. 22 23 ```yaml 24 # Config fields, showing default values 25 metrics: 26 stdout: 27 push_interval: "" 28 static_fields: 29 '@service': benthos 30 flush_metrics: false 31 path_mapping: "" 32 ``` 33 34 When Benthos shuts down all aggregated metrics are printed. If a 35 `push_interval` is specified then metrics are also printed 36 periodically. 37 38 ## Fields 39 40 ### `push_interval` 41 42 An optional period of time to continuously print metrics. 43 44 45 Type: `string` 46 Default: `""` 47 48 ### `static_fields` 49 50 A map of static fields to add to each flushed metric object. 51 52 53 Type: `object` 54 Default: `{"@service":"benthos"}` 55 56 ### `flush_metrics` 57 58 Whether counters and timing metrics should be reset to 0 each time metrics are printed. 59 60 61 Type: `bool` 62 Default: `false` 63 64 ### `path_mapping` 65 66 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. 67 68 69 Type: `string` 70 Default: `""` 71 72 ```yaml 73 # Examples 74 75 path_mapping: this.replace("input", "source").replace("output", "sink") 76 77 path_mapping: |- 78 if ![ 79 "benthos.input.received", 80 "benthos.input.latency", 81 "benthos.output.sent" 82 ].contains(this) { deleted() } 83 ``` 84 85