Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/blank.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ body:
- otelcol.processor.transform
- otelcol.receiver.awscloudwatch
- otelcol.receiver.awsecscontainermetrics
- otelcol.receiver.awss3
- otelcol.receiver.cloudflare
- otelcol.receiver.datadog
- otelcol.receiver.faro
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ body:
- otelcol.processor.transform
- otelcol.receiver.awscloudwatch
- otelcol.receiver.awsecscontainermetrics
- otelcol.receiver.awss3
- otelcol.receiver.cloudflare
- otelcol.receiver.datadog
- otelcol.receiver.faro
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ body:
- otelcol.processor.transform
- otelcol.receiver.awscloudwatch
- otelcol.receiver.awsecscontainermetrics
- otelcol.receiver.awss3
- otelcol.receiver.cloudflare
- otelcol.receiver.datadog
- otelcol.receiver.faro
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ body:
- otelcol.processor.transform
- otelcol.receiver.awscloudwatch
- otelcol.receiver.awsecscontainermetrics
- otelcol.receiver.awss3
- otelcol.receiver.cloudflare
- otelcol.receiver.datadog
- otelcol.receiver.faro
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ body:
- otelcol.processor.transform
- otelcol.receiver.awscloudwatch
- otelcol.receiver.awsecscontainermetrics
- otelcol.receiver.awss3
- otelcol.receiver.cloudflare
- otelcol.receiver.datadog
- otelcol.receiver.faro
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Main (unreleased)

### Features

- (_Experimental_) A new `otelcol.receiver.awss3` component to receive traces previously stored in S3 by the [AWS S3 Exporter](https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.exporter.awss3/). (@x1unix)

- A new `mimir.alerts.kubernetes` component which discovers `AlertmanagerConfig` Kubernetes resources and loads them into a Mimir instance. (@ptodev)

- Mark `stage.windowsevent` block in the `loki.process` component as GA. (@kgeckhart)
Expand Down
1 change: 1 addition & 0 deletions docs/sources/reference/compatibility/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ The following components, grouped by namespace, _consume_ OpenTelemetry `otelcol
- [otelcol.processor.transform](../components/otelcol/otelcol.processor.transform)
- [otelcol.receiver.awscloudwatch](../components/otelcol/otelcol.receiver.awscloudwatch)
- [otelcol.receiver.awsecscontainermetrics](../components/otelcol/otelcol.receiver.awsecscontainermetrics)
- [otelcol.receiver.awss3](../components/otelcol/otelcol.receiver.awss3)
- [otelcol.receiver.cloudflare](../components/otelcol/otelcol.receiver.cloudflare)
- [otelcol.receiver.datadog](../components/otelcol/otelcol.receiver.datadog)
- [otelcol.receiver.faro](../components/otelcol/otelcol.receiver.faro)
Expand Down
221 changes: 221 additions & 0 deletions docs/sources/reference/components/otelcol/otelcol.receiver.awss3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
---
canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.receiver.awss3/
description: Learn about otelcol.receiver.awss3
labels:
stage: experimental
products:
- oss
title: otelcol.receiver.awss3
---

# `otelcol.receiver.awss3`

{{< docs/shared lookup="stability/experimental.md" source="alloy" version="<ALLOY_VERSION>" >}}

`otelcol.receiver.awss3` receives telemetry stored in S3 by the [AWS S3 Exporter](./otelcol.exporter.awss3.md).

{{< admonition type="warning" >}}
`otelcol.receiver.awss3` is a wrapper over the upstream OpenTelemetry Collector [`awss3`][] receiver.
Bug reports or feature requests will be redirected to the upstream repository, if necessary.

[`awss3`]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/awss3receiver
{{< /admonition >}}

The receiver has two modes of operation:

- **Time Range Mode** - Specify start and end to fetch data from a specific time range.
- **SQS Message Mode** - Subscribe to SQS messages to process objects as they arrive.

The receiver supports the following encodings:

- `otlp_json` (OpenTelemetry Protocol format represented as JSON) with a suffix of `.json`
- `otlp_proto` (OpenTelemetry Protocol format represented as Protocol Buffers) with a suffix of `.binpb`

{{< admonition type="note" >}}
Currently, `otelcol.receiver.awss3` receiver doesn't support encoding extensions.
{{< /admonition >}}

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

## Usage

```alloy
otelcol.receiver.awss3 "<LABEL>" {
start_time = "..."
end_time = "..."

s3downloader {
s3_bucket = "..."
s3_prefix = "..."
}

output {
logs = [...]
metrics = [...]
trace = [...]
}
}
```

## Arguments

You can use the following arguments with `otelcol.receiver.awss3`:

| Name | Type | Description | Default | Required |
| ------------ | -------- | ------------------------------------------- | ------- | ----------------------------- |
| `start_time` | `string` | The time at which to start retrieving data. | | Required if fetching by time. |
| `end_time` | `string` | The time at which to stop retrieving data. | | Required if fetching by time. |

The `start_time` and `end_time` fields use one of the following time formats: RFC3339, `YYYY-MM-DD HH:MM`, or `YYYY-MM-DD`. When using `YYYY-MM-DD`, the time defaults to `00:00`.

{{< admonition type="note" >}}
Time-based configuration (`start_time` and `end_time` arguments) can't be combined together with [`sqs`][] block.

[`sqs`]: #sqs

{{< /admonition >}}

Refer to the upstream receiver [documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/{{< param "OTEL_VERSION" >}}/receiver/awss3receiver#configuration) for more details.

## Blocks

You can use the following blocks with `otelcol.receiver.awss3`:

| Block | Description | Required |
| ------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------------- |
| [`s3downloader`][s3downloader] | Configures S3 downloader. | yes |
| [`sqs`][sqs] | Configures SQS queue configuration for receiving object change notification. | Required if fetching by SQS notification. |
| [`output`][output] | Configures where to send received telemetry data. | yes |

[s3downloader]: #s3downloader
[sqs]: #sqs
[output]: #output

### `s3downloader`

{{< badge text="Required" >}}

The `s3downloader` block contains AWS S3 downloader related configuration to control things like bucket, prefix, batching, connections, retries, etc.

The following arguments are supported:

| Name | Type | Description | Default | Required |
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------- | ------------- | -------- |
| `s3_bucket` | `string` | S3 bucket. | | yes |
| `s3_prefix` | `string` | Prefix for the S3 key (root directory inside bucket). | | yes |
| `endpoint_partition_id` | `string` | Partition id to use if `endpoint` is specified. | `"aws"` | no |
| `endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket`. | | no |
| `file_prefix` | `string` | Prefix used to filter files for download. | | no |
| `region` | `string` | AWS region. | `"us-east-1"` | no |
| `s3_force_path_style` | `bool` | When enabled, forces the request to use [path-style addressing][s3-force-path-style-ref]. | `false` | no |
| `s3_partition` | `string` | Time granularity of S3 key: hour or minute. | `"minute"` | no |

[s3-force-path-style-ref]: http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html

### `sqs`

The `sqs` block holds SQS queue configuration for receiving object change notifications.

The following arguments are supported:

| Name | Type | Description | Default | Required |
| ------------------------ | -------- | --------------------------------------------------------------- | ------- | -------- |
| `queue_url` | `string` | The URL of the SQS queue that receives S3 bucket notifications. | | yes |
| `region` | `string` | AWS region of the SQS queue. | | yes |
| `endpoint` | `string` | Custom endpoint for the SQS service. | | no |
| `max_number_of_messages` | `int` | Maximum number of messages to retrieve in a single SQS request. | `10` | no |
| `wait_time_seconds` | `int` | Wait time in seconds for long polling SQS requests. | `20` | no |

{{< admonition type="note" >}}
You must configure your S3 bucket to send event notifications to the SQS queue.
Time-based configuration (`start_time`/`end_time`) and SQS configuration can't be used together.
{{< /admonition >}}

### `output`

{{< badge text="Required" >}}

{{< docs/shared lookup="reference/components/output-block.md" source="alloy" version="<ALLOY_VERSION>" >}}

## Exported fields

`otelcol.receiver.awss3` doesn't export any fields.

## Component health

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

## Debug information

`otelcol.receiver.awss3` doesn't expose any component-specific debug information.

## Example

This example forwards received traces through a batch processor before finally sending it to an OTLP-capable endpoint:

```alloy
// Time range mode:
otelcol.receiver.awss3 "default" {
start_time = "2024-01-01 01:00"
end_time = "2024-01-02"

s3downloader {
region = "us-west-1"
s3_bucket = "mybucket"
s3_prefix = "trace"
s3_partition = "minute"
}

output {
traces = [otelcol.processor.batch.default.input]
}
}

// SQS message mode:
otelcol.receiver.awss3 "sqs_traces" {
s3downloader {
region = "us-east-1"
s3_bucket = "mybucket"
s3_prefix = "mytrace"
}

sqs {
queue_url = "https://sqs.us-east-1.amazonaws.com/123456789012/test-queue"
region = "us-east-1"
}

output {
traces = [otelcol.processor.batch.default.input]
}
}

otelcol.processor.batch "default" {
output {
metrics = [otelcol.exporter.otlp.default.input]
logs = [otelcol.exporter.otlp.default.input]
traces = [otelcol.exporter.otlp.default.input]
}
}

otelcol.exporter.otlp "default" {
client {
endpoint = sys.env("<OTLP_ENDPOINT>")
}
}
```

<!-- START GENERATED COMPATIBLE COMPONENTS -->

## Compatible components

`otelcol.receiver.awss3` can accept arguments from the following components:

- Components that export [OpenTelemetry `otelcol.Consumer`](../../../compatibility/#opentelemetry-otelcolconsumer-exporters)


{{< admonition type="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.
{{< /admonition >}}

<!-- END GENERATED COMPATIBLE COMPONENTS -->
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ require (
github.com/DataDog/datadog-agent/pkg/opentelemetry-mapping-go/otlp/rum v0.73.0-devel.0.20251030121902-cd89eab046d6 // indirect
github.com/DataDog/datadog-agent/pkg/util/defaultpaths v0.69.3 // indirect
github.com/DataDog/datadog-agent/pkg/util/quantile v0.73.0-devel.0.20251030121902-cd89eab046d6 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.11 // indirect
github.com/digitalocean/go-metadata v0.0.0-20250129100319-e3650a3df44b // indirect
github.com/go-openapi/swag/cmdutils v0.25.1 // indirect
github.com/go-openapi/swag/conv v0.25.1 // indirect
Expand All @@ -1005,6 +1006,9 @@ require (
github.com/go-openapi/swag/yamlutils v0.25.1 // indirect
github.com/linode/go-metadata v0.2.2 // indirect
github.com/mitchellh/hashstructure v1.1.0 // indirect
github.com/open-telemetry/opamp-go v0.22.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.139.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awss3receiver v0.139.0 // indirect
github.com/twmb/franz-go/pkg/kadm v1.17.1 // indirect
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
)
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.12 h1:Rw32TILqdeSIfK
github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.39.12/go.mod h1:A6p6Pb5x8Xwl69rskqHOr3fGBENGNBFHCvAjGIvkqOw=
github.com/aws/aws-sdk-go-v2/service/shield v1.29.8 h1:H5urm641txrisNK7AOXVVR3FdG/dGg+CpekseU5BgZk=
github.com/aws/aws-sdk-go-v2/service/shield v1.29.8/go.mod h1:fl0FdAKddek5SfmZAINtCgq0IQohtrQMpAIszgQIVjs=
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.11 h1:tt34G790giMoWqpqJOfvc5BD25hHRSjgvx1x1jtwi9w=
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.11/go.mod h1:tj8YTswoacIeRGjkYuHOkUd4ioQ4Of0m+gy09kuns9o=
github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk=
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8 h1:M5nimZmugcZUO9wG7iVtROxPhiqyZX6ejS1lxlDPbTU=
github.com/aws/aws-sdk-go-v2/service/sso v1.29.8/go.mod h1:mbef/pgKhtKRwrigPPs7SSSKZgytzP8PQ6P6JAAdqyM=
Expand Down Expand Up @@ -1755,6 +1757,8 @@ github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus
github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y=
github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
github.com/open-telemetry/opamp-go v0.22.0 h1:7UnsQgFFS7ffM09JQk+9aGVBAAlsLfcooZ9xvSYwxWM=
github.com/open-telemetry/opamp-go v0.22.0/go.mod h1:339N71soCPrhHywbAcKUZJDODod581ZOxCpTkrl3zYQ=
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.139.0 h1:wsylHna5nuu6Jl+ow9uv3WJ0qKGJxg2aRORFUDa8SAs=
github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.139.0/go.mod h1:LIR7KA0MIoHFQN/mO3zLEeK7piZL3cR6Ig10GfpS5UU=
github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.139.0 h1:USQU4VEL4Vi1rDm1am6LFjIvRGSOWhb+huw1OLIo3Eo=
Expand Down Expand Up @@ -1793,6 +1797,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremote
github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.139.0/go.mod h1:70ZwjOdBJd/vphyHnow3SJg1CU5ZDPRkxwAoKQerjgU=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.139.0 h1:lGhsaspNdzFupSKKYij88cfca5T1D4IR18n70hyBXJ8=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.139.0/go.mod h1:M28yXdZYNKe/OG8O9pk4/+ZJU/2lch6RliXrDVJLLkE=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.139.0 h1:tRWaYl3gYJEAMa9AwdRqnh8aT09derEg5KAQfKAvY/I=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.139.0/go.mod h1:fd4BmG/alnGTP5jbYwyRAegWFkvqYjgXU4EXYUXPUyA=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.139.0 h1:1X2OrH3LPowYMPIqoQL3JxAi4DZ8qeW2yiPTztNStt4=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.139.0/go.mod h1:Jcvh4kIf/LZZh4fvPVVbUgstcMELMgKIncZLJk7bEIA=
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.139.0 h1:3Hhr2s+h3nNiEkvv1G7/ETbvx+BU6z02IBB2ZbrmbNA=
Expand Down Expand Up @@ -1891,6 +1897,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatch
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchreceiver v0.139.0/go.mod h1:RKHgTIuRIYeAXG+PfGGYeuNNHJmL568rhHAZT1F7ulI=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.139.0 h1:6qdUPpYUyv9a7j6Onm8FQbJ+WzigJaZtHmPLTkuXkHg=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.139.0/go.mod h1:WRXQ6QPLWLy2yvv83W0k+BK1jIQ45M++k3YAmt6Xy8A=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awss3receiver v0.139.0 h1:hb89RphDnSdgCh1o9ETaDDGCtwvqDtmroGWtjKuMDss=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awss3receiver v0.139.0/go.mod h1:Dj4yPqiqDiOjJwCu9lRnHk/QBgTNs9Zyj0LwRHdlOw8=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.139.0 h1:RQj1FWnNvAkUi3+ZpznQ8AwEjv+ctZDWR0tQwen2yjU=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudflarereceiver v0.139.0/go.mod h1:IdhQZGwKVhG/+OcMj0SWNLILHT3mx2IOOKh9uru4zhU=
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver v0.139.0 h1:O/rzzvZUa+06SGyVWjOgYchprf5pFwLhDjTK33T3sCU=
Expand Down
1 change: 1 addition & 0 deletions internal/component/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ import (
_ "github.com/grafana/alloy/internal/component/otelcol/processor/transform" // Import otelcol.processor.transform
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/awscloudwatch" // Import otelcol.receiver.awscloudwatch
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/awsecscontainermetrics" // Import otelcol.receiver.awsecscontainermetrics
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/awss3" // Import otelcol.receiver.awss3
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/cloudflare" // Import otelcol.receiver.cloudflare
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/datadog" // Import otelcol.receiver.datadog
_ "github.com/grafana/alloy/internal/component/otelcol/receiver/faro" // Import otelcol.receiver.faro
Expand Down
Loading
Loading