Awss3 Exporter
contrib
Maintainers: @atoulme, @pdelewski, @Erog38
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Schema supported
This exporter targets to support proto/json format.Exporter Configuration
The following exporter configuration parameters are supported.| Name | Description | Default |
|---|---|---|
region | AWS region. | ”us-east-1” |
s3_bucket | S3 bucket | |
s3_base_prefix | root prefix for the S3 key applied to all files. | |
s3_prefix | prefix for the S3 key that can be overridden dynamically by resource_attrs_to_s3 parameter. | |
s3_partition_format | filepath formatting for the partition; See strftime for format specification. | ”year=%Y/month=%m/day=%d/hour=%H/minute=%M” |
s3_partition_timezone | timezone used to format partition | Local |
role_arn | the Role ARN to be assumed | |
file_prefix | file prefix defined by user | |
marshaler | marshaler used to produce output data | otlp_json |
encoding | Encoding extension to use to marshal data. Overrides the marshaler configuration option if set. | |
encoding_file_extension | file format extension suffix when using the encoding configuration option. May be left empty for no suffix to be appended. | |
endpoint | (REST API endpoint) overrides the endpoint used by the exporter instead of constructing it from region and s3_bucket | |
storage_class | S3 storageclass | STANDARD |
acl | S3 Object Canned ACL | none (does not set by default) |
s3_force_path_style | set this to true to force the request to use path-style addressing | false |
disable_ssl | set this to true to disable SSL when sending requests | false |
compression | should the file be compressed | none |
sending_queue | exporters common queuing | disabled |
timeout | exporters common timeout | 5s |
resource_attrs_to_s3 | determines the mapping of S3 configuration values to resource attribute values for uploading operations. | |
retry_mode | The retryer implementation, the supported values are “standard”, “adaptive” and “nop”. “nop” will set the retryer as aws.NopRetryer, which effectively disable the retry. | standard |
retry_max_attempts | The max number of attempts for retrying a request if the retry_mode is set. Setting max attempts to 0 will allow the SDK to retry all retryable errors until the request succeeds, or a non-retryable error is returned. | 3 |
retry_max_backoff | the max backoff delay that can occur before retrying a request if retry_mode is set | 20s |
unique_key_func_name | Name of the function to use for generating a unique portion of the key name, defaults to a random integer. Only supported value is uuidv7. |
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
-
_sourceCategory, _sourceHost, and _sourceName is needed
-
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 appliedgzip: 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 overridess3uploader/s3_bucket. If the specified resource attribute exists in the data,
its value will be used as the bucket; otherwise,s3uploader/s3_bucketwill 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 overridess3uploader/s3_prefix. If the specified resource attribute exists in the data,
its value will be used as the prefix; otherwise,s3uploader/s3_prefixwill serve as the fallback.
Partition Formatting
By setting thes3_partition_format option, users can specify the file path for their logs.
See the strftime reference for more formatting options.
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
Thes3_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.
Data routing based on resource attributes
Whenresource_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.
Base Path with Resource Attributes
When using boths3_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.
- Base Prefix:
environment/prod(always included) - Prefix: Dynamically set from resource attribute
com.awss3.prefixif available, otherwise falls back todefault-metric
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 useextraEnvs in the values.yaml.
Configuration
Example Configuration
Last generated: 2026-04-13