diff --git a/CHANGELOG.md b/CHANGELOG.md index 56a9ed9e96..9cb2217ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Main (unreleased) ### Features + - Add `otelcol.exporter.file` component to write metrics, logs, and traces to disk with optional rotation, compression, and grouping by resource attribute. (@madhub) - (_Experimental_) Additions to experimental `database_observability.mysql` component: - `explain_plans` collector now changes schema before returning the connection to the pool (@cristiangreco) diff --git a/docs/sources/reference/components/otelcol/otelcol.exporter.file.md b/docs/sources/reference/components/otelcol/otelcol.exporter.file.md new file mode 100644 index 0000000000..473a4c652b --- /dev/null +++ b/docs/sources/reference/components/otelcol/otelcol.exporter.file.md @@ -0,0 +1,246 @@ +--- +canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.exporter.file/ +description: Learn about otelcol.exporter.file +labels: + stage: general-availability + products: + - oss + tags: + - text: Community + tooltip: This component is developed, maintained, and supported by the Alloy user community. +title: otelcol.exporter.file +--- + +# `otelcol.exporter.file` + +{{< docs/shared lookup="stability/community.md" source="alloy" version="" >}} + +`otelcol.exporter.file` accepts metrics, logs, and traces telemetry data from other `otelcol` components and writes it to files on disk. +You can write data in JSON or Protocol Buffers `proto` format. +You can optionally enable file rotation, compression, and separate output files based on a resource attribute. + +{{< admonition type="note" >}} +`otelcol.exporter.file` is a wrapper over the upstream OpenTelemetry Collector Contrib [`fileexporter`][] exporter. +Bug reports or feature requests will be redirected to the upstream repository, if necessary. + +[`fileexporter`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/exporter/fileexporter +{{< /admonition >}} + +You can specify multiple `otelcol.exporter.file` components by giving them different labels. + +## Usage + +```alloy +otelcol.exporter.file "