@@ -13,13 +13,46 @@ Currently, it only describes the serialization of OpenTelemetry data to the OTLP
1313
1414## Table of Contents
1515
16+ - [ Use Cases] ( #use-cases )
17+ - [ Exporter configuration] ( #exporter-configuration )
18+ - [ Programmatic configuration] ( #programmatic-configuration )
1619- [ JSON File serialization] ( #json-file-serialization )
1720 - [ File storage requirements] ( #file-storage-requirements )
1821 - [ JSON lines file] ( #json-lines-file )
1922 - [ Streaming appending] ( #streaming-appending )
2023 - [ Telemetry data requirements] ( #telemetry-data-requirements )
2124 - [ Examples] ( #examples )
2225
26+ ## Use Cases
27+
28+ Why do we need a file exporter - why not just use the OTLP exporter?
29+
30+ - * Faas* : In a FaaS environment, the OTLP exporter may not be able to send data to a collector.
31+ - * Consistent log scraping from pods* : In a Kubernetes environment, logs are often scraped from the stdout pod file.
32+ This exporter can be used to write logs to stdout - which makes it easier to integrate with existing log scraping tools.
33+ Existing solutions add metadata, such as the trace ID, to the log line,
34+ which needs manual configuration and is error-prone.
35+ - * Reliability* : Some prefer writing logs to a file rather than sending data over the network for reliability reasons.
36+
37+ ## Exporter configuration
38+
39+ The metric exporter MUST support the environment variables defined in the
40+ [ OTLP Exporter] ( ../metrics/sdk_exporters/otlp.md#additional-environment-variable-configuration )
41+ specification.
42+
43+ If a language provides a mechanism to automatically configure a
44+ span or logs processor to pair with the associated
45+ exporter (e.g., using the [ ` OTEL_TRACES_EXPORTER ` environment
46+ variable] ( ../configuration/sdk-environment-variables.md#exporter-selection ) ), by
47+ default the OpenTelemetry Protocol File Exporter SHOULD be paired with a batching
48+ processor.
49+
50+ ### Programmatic configuration
51+
52+ | Requirement | Name | Description | Default |
53+ | -------------| ----------------------------| --------------------------------------------------------------------------------------------------------| ---------|
54+ | MUST | output stream (or similar) | Configure output stream. This SHOULD include the possibility to configure the output stream to a file. | stdout |
55+
2356## JSON File serialization
2457
2558This document describes the serialization of OpenTelemetry data as JSON objects that can be stored in files.
0 commit comments