Menu
Grafana Cloud

Experimental

otelcol.exporter.awss3

EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement. The stability.level flag must be set to experimental to use the component.

otelcol.exporter.awss3 accepts telemetry data from other otelcol components and writes them to an AWS S3 bucket.

Note

otelcol.exporter.awss3 is a wrapper over the upstream OpenTelemetry Collector Contrib awss3 exporter. Bug reports or feature requests will be redirected to the upstream repository if necessary.

You can specify multiple otelcol.exporter.awss3 components by giving them different labels.

Usage

alloy
otelcol.exporter.awss3 "<LABEL>" {
  s3_uploader {
    region = "<REGION>"
    s3_bucket = "<BUCKET_NAME>"
    s3_prefix = "<PREFIX>"
  }
}

Replace the following:

  • <LABEL>: The label for the otelcol.exporter.awss3 component.
  • <REGION>: The AWS region.
  • <BUCKET_NAME>: The S3 bucket.
  • <PREFIX>: The prefix for the S3 key.

Arguments

otelcol.exporter.awss3 supports the following arguments:

NameTypeDescriptionDefaultRequired
encodingstringEncoding extension to use to marshal data. Overrides the marshaler configuration option if set.""no
encoding_file_extstringFile format extension suffix when using the encoding configuration option. It can be left empty if a suffix shouldn’t be appended.""no

Blocks

The following blocks are supported inside the definition of otelcol.exporter.awss3:

HierarchyBlockDescriptionRequired
s3_uploaders3_uploaderConfigures the AWS S3 bucket details to send telemetry data to.yes
marshalermarshalerMarshaler used to produce output data.no
debug_metricsdebug_metricsConfigures the metrics that this component generates to monitor its state.no

s3_uploader block

The s3_uploader block configures the AWS S3 bucket details used by the component.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
regionstringThe AWS region."us-east-1"no
s3_bucketstringThe S3 bucket.yes
s3_prefixstringPrefix for the S3 key (root directory inside the bucket).yes
s3_partitionstringTime granularity of S3 key: hour or minute."minute"no
role_arnstringThe Role ARN to be assumed.no
file_prefixstringThe file prefix defined by the user.no
endpointstringOverrides the endpoint used by the exporter instead of constructing it from region and s3_bucket.no
s3_force_path_stylebooleanSet this to true to force the request to use path-style requestsfalseno
disable_sslbooleanSet this to true to disable SSL when sending requests.false
compressionstringHow should the file be compressed? none, gzipnoneno

marshaler block

Marshaler determines the format of data sent to AWS S3. Currently, the following marshalers are implemented:

The following arguments are supported:

NameTypeDescriptionDefaultRequired
typestringMarshaler used to produce output data."otlp_json"no

debug_metrics block

The debug_metrics block configures the metrics that this component generates to monitor its state.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
disable_high_cardinality_metricsbooleanWhether to disable certain high cardinality metrics.trueno
levelstringControls the level of detail for metrics emitted by the wrapped collector."detailed"no

disable_high_cardinality_metrics is the Grafana Alloy equivalent to the telemetry.disableHighCardinalityMetrics feature gate in the OpenTelemetry Collector. It removes attributes that could cause high cardinality metrics. For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.

Note

If configured, disable_high_cardinality_metrics only applies to otelcol.exporter.* and otelcol.receiver.* components.

level is the Alloy equivalent to the telemetry.metrics.level feature gate in the OpenTelemetry Collector. Possible values are "none", "basic", "normal" and "detailed".

Encoding

Encoding overrides the marshaler if it’s present and sets it to use the encoding extension defined in the collector configuration.

Refer to the Open Telemetry [encoding extensions][] documentation for more information.

Compression

  • none (default): File compression isn’t used.
  • gzip: Files are compressed with Gzip. This doesn’t support sumo_icmarshaler.

Exported fields

The following fields are exported and can be referenced by other components:

NameTypeDescription
inputotelcol.ConsumerA value that other components can use to send telemetry data to.

input accepts otelcol.Consumer data for any telemetry signal (metrics, logs, or traces).

Component health

otelcol.exporter.awss3 is only reported as unhealthy if given an invalid configuration.

Debug information

otelcol.exporter.awss3 doesn’t expose any component-specific debug information.

Debug metrics

  • otelcol_exporter_sent_spans_total (counter): Number of spans successfully sent to destination.
  • otelcol_exporter_send_failed_spans_total (counter): Number of spans in failed attempts to send to destination.
  • otelcol_exporter_queue_capacity (gauge): Fixed capacity of the retry queue (in batches).
  • otelcol_exporter_queue_size (gauge): Current size of the retry queue (in batches).
  • rpc_client_duration_milliseconds (histogram): Measures the duration of inbound RPC.
  • rpc_client_request_size_bytes (histogram): Measures size of RPC request messages (uncompressed).
  • rpc_client_requests_per_rpc (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.
  • rpc_client_response_size_bytes (histogram): Measures size of RPC response messages (uncompressed).
  • rpc_client_responses_per_rpc (histogram): Measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs.

Example

This example forwards scrape logs to an AWS S3 Bucket:

alloy
local.file_match "logs" {
  path_targets = [{
    __address__ = "localhost",
    __path__    = "/var/log/{syslog,messages,*.log}",
    instance    = constants.hostname,
    job         = "integrations/node_exporter",
  }]
}

loki.source.file "logs" {
  targets    = local.file_match.logs.targets
  forward_to = [otelcol.receiver.loki.default.receiver]
}

otelcol.receiver.loki "default" {
  output {
    logs = [otelcol.exporter.awss3.logs.input]
  }
}

otelcol.exporter.awss3 "logs" {
  s3_uploader {
    region = "us-east-1"
    s3_bucket = "logs_bucket"
    s3_prefix = "logs"
  }
}

Compatible components

otelcol.exporter.awss3 has exports that can be consumed by the following components:

Note

Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.