Skip to content

Commit 5410cab

Browse files
authored
Merge pull request #88391 from max-cx/OBSDOCS-1619
OBSDOCS-1619: Docs for TP File Exporter
2 parents 4f50b88 + a2c8f2c commit 5410cab

File tree

1 file changed

+45
-8
lines changed

1 file changed

+45
-8
lines changed

observability/otel/otel-collector/otel-collector-exporters.adoc

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ Currently, the following General Availability and Technology Preview exporters a
2020
- xref:../../../observability/otel/otel-collector/otel-collector-exporters.adoc#aws-cloudwatch-exporter_otel-collector-exporters[AWS CloudWatch Exporter]
2121
- xref:../../../observability/otel/otel-collector/otel-collector-exporters.adoc#aws-emf-exporter_otel-collector-exporters[AWS EMF Exporter]
2222
- xref:../../../observability/otel/otel-collector/otel-collector-exporters.adoc#aws-xray-exporter_otel-collector-exporters[AWS X-Ray Exporter]
23+
- xref:../../../observability/otel/otel-collector/otel-collector-exporters.adoc#file-exporter_otel-collector-exporters[File Exporter]
2324
2425
[id="otlp-exporter_{context}"]
2526
== OTLP Exporter
2627

2728
The OTLP gRPC Exporter exports traces and metrics by using the OpenTelemetry protocol (OTLP).
2829

29-
.OpenTelemetry Collector custom resource with an enabled OTLP Exporter
30+
.OpenTelemetry Collector custom resource with the enabled OTLP Exporter
3031
[source,yaml]
3132
----
3233
# ...
@@ -65,7 +66,7 @@ The OTLP gRPC Exporter exports traces and metrics by using the OpenTelemetry pro
6566

6667
The OTLP HTTP Exporter exports traces and metrics by using the OpenTelemetry protocol (OTLP).
6768

68-
.OpenTelemetry Collector custom resource with an enabled OTLP Exporter
69+
.OpenTelemetry Collector custom resource with the enabled OTLP Exporter
6970
[source,yaml]
7071
----
7172
# ...
@@ -96,7 +97,7 @@ The OTLP HTTP Exporter exports traces and metrics by using the OpenTelemetry pro
9697

9798
The Debug Exporter prints traces and metrics to the standard output.
9899

99-
.OpenTelemetry Collector custom resource with an enabled Debug Exporter
100+
.OpenTelemetry Collector custom resource with the enabled Debug Exporter
100101
[source,yaml]
101102
----
102103
# ...
@@ -128,7 +129,7 @@ The Load Balancing Exporter consistently exports spans, metrics, and logs accord
128129
:FeatureName: The Load Balancing Exporter
129130
include::snippets/technology-preview.adoc[leveloffset=+1]
130131

131-
.OpenTelemetry Collector custom resource with an enabled Load Balancing Exporter
132+
.OpenTelemetry Collector custom resource with the enabled Load Balancing Exporter
132133
[source,yaml]
133134
----
134135
# ...
@@ -168,7 +169,7 @@ The Prometheus Exporter exports metrics in the Prometheus or OpenMetrics formats
168169
:FeatureName: The Prometheus Exporter
169170
include::snippets/technology-preview.adoc[]
170171

171-
.OpenTelemetry Collector custom resource with an enabled Prometheus Exporter
172+
.OpenTelemetry Collector custom resource with the enabled Prometheus Exporter
172173
[source,yaml]
173174
----
174175
# ...
@@ -217,7 +218,7 @@ The Prometheus Remote Write Exporter exports metrics to compatible back ends.
217218
:FeatureName: The Prometheus Remote Write Exporter
218219
include::snippets/technology-preview.adoc[]
219220

220-
.OpenTelemetry Collector custom resource with an enabled Prometheus Remote Write Exporter
221+
.OpenTelemetry Collector custom resource with the enabled Prometheus Remote Write Exporter
221222
[source,yaml]
222223
----
223224
# ...
@@ -259,7 +260,7 @@ The Kafka Exporter exports logs, metrics, and traces to Kafka. This exporter use
259260
:FeatureName: The Kafka Exporter
260261
include::snippets/technology-preview.adoc[]
261262

262-
.OpenTelemetry Collector custom resource with an enabled Kafka Exporter
263+
.OpenTelemetry Collector custom resource with the enabled Kafka Exporter
263264
[source,yaml]
264265
----
265266
# ...
@@ -447,7 +448,43 @@ include::snippets/technology-preview.adoc[]
447448
// * link:https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-auth.html[Configure Authentication] (AWS SDK for Go v2 Developer Guide)
448449
* link:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html[IAM roles] (AWS Identity and Access Management User Guide)
449450

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.
486+
450487
[role="_additional-resources"]
451488
[id="additional-resources_otel-collector-exporters_{context}"]
452489
== Additional resources
453-
* link:https://opentelemetry.io/docs/specs/otlp/[OpenTelemetry Protocol (OTLP) documentation]
490+
* link:https://opentelemetry.io/docs/specs/otlp/[OpenTelemetry Protocol (OTLP) documentation]

0 commit comments

Comments
 (0)