Skip to main content

Awss3 Exporter

Status Available in: contrib Maintainers: @atoulme, @pdelewski, @Erog38 Source: opentelemetry-collector-contrib

Supported Telemetry

Logs Metrics Traces

Overview

Schema supported

This exporter targets to support proto/json format.

Exporter Configuration

The following exporter configuration parameters are supported.

Marshaler

Marshaler determines the format of data sent to AWS S3. Currently, the following marshalers are implemented:
  • otlp_json (default): the OpenTelemetry Protocol format, represented as json.
  • otlp_proto: the OpenTelemetry Protocol format, represented as Protocol Buffers. A single protobuf message is written into each object.
  • sumo_ic: the Sumo Logic Installed Collector Archive format.
    • _sourceCategory, _sourceHost, and _sourceName is needed
    This format is supported only for logs.
  • body: export the log body as string. This format is supported only for logs.

Encoding

Encoding overrides marshaler if present and sets to use an encoding extension defined in the collector configuration. See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding.

Compression

  • none (default): No compression will be applied
  • gzip: Files will be compressed with gzip.
  • zstd: Files will be compressed with zstd.

resource_attrs_to_s3

  • s3_bucket: Defines which resource attribute’s value should be used as the S3 bucket. When this option is set, it dynamically overrides s3uploader/s3_bucket. If the specified resource attribute exists in the data,
    its value will be used as the bucket; otherwise, s3uploader/s3_bucket will serve as the fallback.
  • s3_prefix: Defines which resource attribute’s value should be used as the S3 prefix. When this option is set, it dynamically overrides s3uploader/s3_prefix. If the specified resource attribute exists in the data,
    its value will be used as the prefix; otherwise, s3uploader/s3_prefix will serve as the fallback.
Following example configuration defines to store output in ‘eu-central’ region and bucket named ‘databucket’.
Logs and traces will be stored inside ‘databucket’ in the following path format.

Partition Formatting

By setting the s3_partition_format option, users can specify the file path for their logs. See the strftime reference for more formatting options.
In this case, logs and traces would be stored in the following path format.
Optionally along with s3_partition_format you can provide s3_partition_timezone as name from IANA Time Zone database to change default local timezone to custom, for example UTC or Europe/London.

Base Path Configuration

The s3_base_prefix option allows you to specify a root path inside the bucket that is not overridden by resource_attrs_to_s3. If provided, s3_prefix will be appended to this base path.
In this case, logs and traces would be stored in the following path format.

Data routing based on resource attributes

When resource_attrs_to_s3/s3_bucket or resource_attrs_to_s3/s3_prefix is configured, the S3 bucket and/or prefix are dynamically derived from specified resource attributes in your data. If the attribute values are unavailable, the bucket and prefix will fall back to the values defined in s3uploader/s3_bucket and s3uploader/s3_prefix respectively.
In this case, metrics, logs and traces would be stored in the following path format examples:

Base Path with Resource Attributes

When using both s3_base_prefix and resource_attrs_to_s3/s3_prefix, the s3_base_prefix is always used while s3_prefix can be dynamically overridden by resource attributes.
In this configuration:
  • Base Prefix: environment/prod (always included)
  • Prefix: Dynamically set from resource attribute com.awss3.prefix if available, otherwise falls back to default-metric
Path format examples:
This allows you to maintain consistent organizational structure (via base path) while dynamically routing different data types or services to specific subdirectories.

Retry

Standard is the default retryer implementation used by service clients. See the retry package documentation for details on what errors are considered as retryable by the standard retryer implementation. See also the aws-sdk-go reference for more information.

AWS Credential Configuration

This exporter follows default credential resolution for the aws-sdk-go. Follow the guidelines for the credential configuration.

OpenTelemetry Collector Helm Chart for Kubernetes

For example, when using OpenTelemetry Collector Helm Chart you could use extraEnvs in the values.yaml.

Configuration

Example Configuration


Last generated: 2026-08-24