You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// * link:https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-auth.html[Configure Authentication] (AWS SDK for Go v2 Developer Guide)
448
449
* link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html[IAM roles] (AWS Identity and Access Management User Guide)
449
450
451
+
[id="file-exporter_{context}"]
452
+
== File Exporter
453
+
454
+
The File Exporter writes telemetry data to files in persistent storage and supports file operations such as rotation, compression, and writing to multiple files. With this exporter, you can also use a resource attribute to control file naming. The only required setting is `path`, which specifies the destination path for telemetry files in the persistent-volume file system.
455
+
456
+
:FeatureName: The File Exporter
457
+
include::snippets/technology-preview.adoc[]
458
+
459
+
.OpenTelemetry Collector custom resource with the enabled File Exporter
460
+
[source,yaml]
461
+
----
462
+
# ...
463
+
config: |
464
+
exporters:
465
+
file:
466
+
path: /data/metrics.json # <1>
467
+
rotation: # <2>
468
+
max_megabytes: 10 # <3>
469
+
max_days: 3 # <4>
470
+
max_backups: 3 # <5>
471
+
localtime: true # <6>
472
+
format: proto # <7>
473
+
compression: zstd # <8>
474
+
flush_interval: 5 # <9>
475
+
# ...
476
+
----
477
+
<1> The file-system path where the data is to be written. There is no default.
478
+
<2> File rotation is an optional feature of this exporter. By default, telemetry data is exported to a single file. Add the `rotation` setting to enable file rotation.
479
+
<3> The `max_megabytes` setting is the maximum size a file is allowed to reach until it is rotated. The default is `100`.
480
+
<4> The `max_days` setting is for how many days a file is to be retained, counting from the timestamp in the file name. There is no default.
481
+
<5> The `max_backups` setting is for retaining several older files. The defalt is `100`.
482
+
<6> The `localtime` setting specifies the local-time format for the timestamp, which is appended to the file name in front of any extension, when the file is rotated. The default is the Coordinated Universal Time (UTC).
483
+
<7> The format for encoding the telemetry data before writing it to a file. The default format is `json`. The `proto` format is also supported.
484
+
<8> File compression is optional and not set by default. This setting defines the compression algorithm for the data that is exported to a file. Currently, only the `zstd` compression algorithm is supported. There is no default.
485
+
<9> The time interval between flushes. A value without a unit is set in nanoseconds. This setting is ignored when file rotation is enabled through the `rotation` settings.
0 commit comments