diff --git a/.github/ISSUE_TEMPLATE/blank.yaml b/.github/ISSUE_TEMPLATE/blank.yaml index 9a3b2920320..639bd575ffe 100644 --- a/.github/ISSUE_TEMPLATE/blank.yaml +++ b/.github/ISSUE_TEMPLATE/blank.yaml @@ -94,6 +94,7 @@ body: - otelcol.exporter.datadog - otelcol.exporter.debug - otelcol.exporter.faro + - otelcol.exporter.file - otelcol.exporter.googlecloud - otelcol.exporter.googlecloudpubsub - otelcol.exporter.kafka diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index a91fc4e793a..ddc6c890e3b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -94,6 +94,7 @@ body: - otelcol.exporter.datadog - otelcol.exporter.debug - otelcol.exporter.faro + - otelcol.exporter.file - otelcol.exporter.googlecloud - otelcol.exporter.googlecloudpubsub - otelcol.exporter.kafka diff --git a/.github/ISSUE_TEMPLATE/docs.yaml b/.github/ISSUE_TEMPLATE/docs.yaml index 5b927b7ab5d..e7c57c56bf2 100644 --- a/.github/ISSUE_TEMPLATE/docs.yaml +++ b/.github/ISSUE_TEMPLATE/docs.yaml @@ -97,6 +97,7 @@ body: - otelcol.exporter.datadog - otelcol.exporter.debug - otelcol.exporter.faro + - otelcol.exporter.file - otelcol.exporter.googlecloud - otelcol.exporter.googlecloudpubsub - otelcol.exporter.kafka diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index ab8c4e54da5..156c79fd0f6 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -94,6 +94,7 @@ body: - otelcol.exporter.datadog - otelcol.exporter.debug - otelcol.exporter.faro + - otelcol.exporter.file - otelcol.exporter.googlecloud - otelcol.exporter.googlecloudpubsub - otelcol.exporter.kafka diff --git a/.github/ISSUE_TEMPLATE/proposal.yaml b/.github/ISSUE_TEMPLATE/proposal.yaml index 91a85c121a9..7def2c7147e 100644 --- a/.github/ISSUE_TEMPLATE/proposal.yaml +++ b/.github/ISSUE_TEMPLATE/proposal.yaml @@ -94,6 +94,7 @@ body: - otelcol.exporter.datadog - otelcol.exporter.debug - otelcol.exporter.faro + - otelcol.exporter.file - otelcol.exporter.googlecloud - otelcol.exporter.googlecloudpubsub - otelcol.exporter.kafka diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d24d013f0f..ee38a783ef6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,8 @@ v1.12.0 ### 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_) Add an `otelcol.receiver.cloudflare` component to receive logs pushed by Cloudflare's [LogPush](https://developers.cloudflare.com/logs/logpush/) jobs. (@x1unix) diff --git a/docs/sources/reference/compatibility/_index.md b/docs/sources/reference/compatibility/_index.md index 55ae1649ab0..439d4ea2d05 100644 --- a/docs/sources/reference/compatibility/_index.md +++ b/docs/sources/reference/compatibility/_index.md @@ -318,6 +318,7 @@ The following components, grouped by namespace, _export_ OpenTelemetry `otelcol. - [otelcol.exporter.datadog](../components/otelcol/otelcol.exporter.datadog) - [otelcol.exporter.debug](../components/otelcol/otelcol.exporter.debug) - [otelcol.exporter.faro](../components/otelcol/otelcol.exporter.faro) +- [otelcol.exporter.file](../components/otelcol/otelcol.exporter.file) - [otelcol.exporter.googlecloud](../components/otelcol/otelcol.exporter.googlecloud) - [otelcol.exporter.googlecloudpubsub](../components/otelcol/otelcol.exporter.googlecloudpubsub) - [otelcol.exporter.kafka](../components/otelcol/otelcol.exporter.kafka) 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 00000000000..1bda65a39ff --- /dev/null +++ b/docs/sources/reference/components/otelcol/otelcol.exporter.file.md @@ -0,0 +1,238 @@ +--- +canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.exporter.file/ +description: Learn about otelcol.exporter.file +labels: + stage: public-preview + products: + - oss +title: otelcol.exporter.file +--- + +# `otelcol.exporter.file` + +`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 "