From 690cdee6640c8553a6d34046b4b73a9939e6fa10 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 24 Apr 2024 09:43:11 -0500 Subject: [PATCH 01/26] working awss3 exporter component --- go.mod | 1 + go.sum | 2 + internal/component/all/all.go | 1 + .../component/otelcol/exporter/awss3/awss3.go | 90 +++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 internal/component/otelcol/exporter/awss3/awss3.go diff --git a/go.mod b/go.mod index 763ea37cd..3c8a2638e 100644 --- a/go.mod +++ b/go.mod @@ -260,6 +260,7 @@ require ( require ( github.com/Shopify/sarama v1.38.1 github.com/grafana/kafka_exporter v0.0.0-20240409084445-5e3488ad9f9a + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.96.0 ) require ( diff --git a/go.sum b/go.sum index ed5236a75..0fae7a2f9 100644 --- a/go.sum +++ b/go.sum @@ -1702,6 +1702,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraph github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.96.0/go.mod h1:/NA9T4O1WOlkUwvTXBz5wmuddpC0cc2cDLEBH5ck9eM= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.96.0 h1:KAlAzuzvYq0xZWRR+N2qUJhE7/pvmNFYlcN5yW8Km60= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.96.0/go.mod h1:KcZjtSdoelUWRwGtVaiEX16Hw8mFH+JnYrN+r4Ox550= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.96.0 h1:xCxngHclXqvvEZ1M2mwrYI50X5ZiyXOaGuRYo31uVBQ= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.96.0/go.mod h1:j/h1Y3drOchJKdbGueHzEBRzvzy4QdzVKJ8GpvQX3jw= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.96.0 h1:2FnXGN9xxIcIz7f4hdX+OgsGowWC1D35oNtX5ErnLBc= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.96.0/go.mod h1:VPyawEuVpqKg3oemeDnYwDfBbh9gjGbrVVXl4OeHK60= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter v0.96.0 h1:3+Ca2P/XLCSSc3299+4fjQf2sPMepiewR+KSBzzIGvg= diff --git a/internal/component/all/all.go b/internal/component/all/all.go index 498aa106c..980fc4ced 100644 --- a/internal/component/all/all.go +++ b/internal/component/all/all.go @@ -67,6 +67,7 @@ import ( _ "github.com/grafana/alloy/internal/component/otelcol/connector/servicegraph" // Import otelcol.connector.servicegraph _ "github.com/grafana/alloy/internal/component/otelcol/connector/spanlogs" // Import otelcol.connector.spanlogs _ "github.com/grafana/alloy/internal/component/otelcol/connector/spanmetrics" // Import otelcol.connector.spanmetrics + _ "github.com/grafana/alloy/internal/component/otelcol/exporter/awss3" // Import otelcol.exporter.awss3exporter _ "github.com/grafana/alloy/internal/component/otelcol/exporter/loadbalancing" // Import otelcol.exporter.loadbalancing _ "github.com/grafana/alloy/internal/component/otelcol/exporter/logging" // Import otelcol.exporter.logging _ "github.com/grafana/alloy/internal/component/otelcol/exporter/loki" // Import otelcol.exporter.loki diff --git a/internal/component/otelcol/exporter/awss3/awss3.go b/internal/component/otelcol/exporter/awss3/awss3.go new file mode 100644 index 000000000..06b494a11 --- /dev/null +++ b/internal/component/otelcol/exporter/awss3/awss3.go @@ -0,0 +1,90 @@ +// Package awss3 provides an otelcol.exporter.awss3 component +package awss3 + +import ( + "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/component/otelcol" + "github.com/grafana/alloy/internal/component/otelcol/exporter" + "github.com/grafana/alloy/internal/featuregate" + "github.com/mitchellh/mapstructure" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter" + otelcomponent "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configcompression" + otelextension "go.opentelemetry.io/collector/extension" +) + +func init() { + component.Register(component.Registration{ + Name: "otelcol.exporter.awss3", + Stability: featuregate.StabilityGenerallyAvailable, + Args: Arguments{}, + Exports: otelcol.ConsumerExports{}, + + Build: func(opts component.Options, args component.Arguments) (component.Component, error) { + fact := awss3exporter.NewFactory() + return exporter.New(opts, fact, args.(Arguments), exporter.TypeAll) + }, + }) +} + +// Arguments configures the otelcol.exporter.awss3 component. +type Arguments struct { + Region string `alloy:"region,attr"` + S3Bucket string `alloy:"s3_bucket,attr"` + S3Prefix string `alloy:"s3_prefix,attr"` + S3Partition string `alloy:"s3_partition,attr,optional"` + RoleArn string `alloy:"role_arn,attr,optional"` + FilePrefix string `alloy:"file_prefix,attr,optional"` + Marshaler awss3exporter.MarshalerType `alloy:"marshaler,attr,optional"` + Encoding string `alloy:"encoding,attr,optional"` + EncodingFileExtension string `alloy:"encoding_file_ext,attr,optional"` + Endpoint string `alloy:"endpoint,attr"` + S3ForcePathStyle bool `alloy:"s3_force_path_style,attr,optional"` + DisableSSL bool `alloy:"disable_ssl,attr,optional"` + Compression configcompression.Type `alloy:"compression,attr,optional"` + + // DebugMetrics configures component internal metrics. Optional + DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` +} + +var _ exporter.Arguments = Arguments{} + +func (args *Arguments) SetToDefault() { + *args = Arguments{ + Region: "us-east-1", + Marshaler: "otlp_json", + S3ForcePathStyle: false, + DisableSSL: false, + Compression: configcompression.TypeGzip, + } +} + +func (args Arguments) Convert() (otelcomponent.Config, error) { + input := make(map[string]interface{}) + + var result awss3exporter.Config + err := mapstructure.Decode(input, &result) + if err != nil { + return nil, err + } + + result.S3Uploader.Region = args.Region + result.S3Uploader.S3Bucket = args.S3Bucket + result.S3Uploader.S3Prefix = args.S3Prefix + + result.MarshalerName = args.Marshaler + + return &result, nil +} + +func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension { + return nil +} + +func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component { + return nil +} + +func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments { + return args.DebugMetrics +} From 476992d410318f197fab27c3185b59dfea3544b6 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 1 May 2024 09:31:15 -0500 Subject: [PATCH 02/26] updated component to include blocks Added documentation --- .../components/otelcol.exporter.awss3.md | 129 ++++++++++++++++++ .../component/otelcol/exporter/awss3/awss3.go | 92 ++++++++----- 2 files changed, 190 insertions(+), 31 deletions(-) create mode 100644 docs/sources/reference/components/otelcol.exporter.awss3.md diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md new file mode 100644 index 000000000..7cf905367 --- /dev/null +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -0,0 +1,129 @@ +--- +canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol.exporter.awss3/ +description: Learn about otelcol.exporter.awss3 +title: otelcol.exporter.awss3 +--- + +# otelcol.exporter.awss3 + +`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. + +Multiple `otelcol.exporter.awss3` components can be specified by giving them +different labels. + +## Usage + +```alloy +otelcol.exporter.awss3 "LABEL" { + s3_uploader { + region = "REGION" + s3_bucket = "BUCKET_NAME" + s3_prefix = "PREFIX" + } +} +``` + +## Arguments + +`otelcol.exporter.awss3` supports the following arguments: + +Name | Type | Description | Default | Required +-----------|------------|--------------------------------------------------|---------|--------- +`encoding` | `string` | Encoding extension to use to marshal data. Overrides the `marshaler` configuration option if set. | `""` | no +`encoding_file_ext` | `string` | file format extension suffix when using the `encoding` configuration option. May be left empty for no suffix to be appended. | `""` | no + +## Blocks + +The following blocks are supported inside the definition of +`otelcol.exporter.awss3`: + +Hierarchy | Block | Description | Required +-----------------------|----------------------|--------------------------------------------------------------------------------------|--------- +s3_uploader | [s3_uploader][] | Configures the AWS S3 bucket details to send telemetry data to. | yes +marshaler | [marshaler][] | Marshaler used to produce output data. | no +debug_metrics | [debug_metrics][] | Configures the metrics that this component generates to monitor its state. | no + +The `>` symbol indicates deeper levels of nesting. For example, `client > tls` +refers to a `tls` block defined inside a `client` block. + +[s3_uploader]: #s3_uploader-block +[marshaler]: #marshaler-block +[debug_metrics]: #debug_metrics-block + +### s3_uploader block + +The `s3_uploader` block configures the AWS S3 bucket details used by the component. + +The following arguments are supported: + +Name | Type | Description | Default | Required +----------------------|----------------------------|----------------------------------------------------------------------------------|--------------|--------- +`region` | `string` | AWS region. | `"us-east-1"`| no +`s3_bucket` | `string` | S3 bucket | | yes +`s3_prefix` | `string` | Prefix for the S3 key (root directory inside bucket). | | yes +`s3_partition` | `string` | Time granularity of S3 key: hour or minute | `"minute"` | no +`role_arn` | `string` | The Role ARN to be assumed | | no +`file_prefix` | `string` | File prefix defined by user | | no +`endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket` | | no +`s3_force_path_style` | `boolean` | [Set this to `true` to force the request to use path-style addressing](http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html) | `false` | no +`disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests | | `false` +`compression` | `string` | should the file be compressed | `none` | no + +### marshaler block + +Marshaler determines the format of data sent to AWS S3. Currently, the following marshalers are implemented: + +- `otlp_json` (default): the [OpenTelemetry Protocol format](https://github.com/open-telemetry/opentelemetry-proto), represented as json. +- `otlp_proto`: the [OpenTelemetry Protocol format](https://github.com/open-telemetry/opentelemetry-proto), represented as Protocol Buffers. A single protobuf message is written into each object. +- `sumo_ic`: the [Sumo Logic Installed Collector Archive format](https://help.sumologic.com/docs/manage/data-archiving/archive/). + **This format is supported only for logs.** +- `body`: export the log body as string. + **This format is supported only for logs.** + +The following arguments are supported: + +Name | Type | Description | Default | Required +------------------------|------------|--------------------------------------------------------------------------------------------|---------|--------- +`type` | `string` | Marshaler used to produce output data | `"otlp_json"` | no + +### 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](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. **This does not support `sumo_ic`marshaler.** + +## Component health + +`otelcol.exporter.awss3` is only reported as unhealthy if given an invalid +configuration. + +## Debug information + +`otelcol.exporter.awss3` does not expose any component-specific debug +information. + +## Debug metrics + +* `exporter_sent_spans_ratio_total` (counter): Number of spans successfully sent to destination. +* `exporter_send_failed_spans_ratio_total` (counter): Number of spans in failed attempts to send to destination. +* `exporter_queue_capacity_ratio` (gauge): Fixed capacity of the retry queue (in batches) +* `exporter_queue_size_ratio` (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. + +## Examples + +The following examples show you how to create an exporter to send data to different destinations. diff --git a/internal/component/otelcol/exporter/awss3/awss3.go b/internal/component/otelcol/exporter/awss3/awss3.go index 06b494a11..24d644f1e 100644 --- a/internal/component/otelcol/exporter/awss3/awss3.go +++ b/internal/component/otelcol/exporter/awss3/awss3.go @@ -6,7 +6,6 @@ import ( "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/exporter" "github.com/grafana/alloy/internal/featuregate" - "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter" otelcomponent "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configcompression" @@ -29,19 +28,11 @@ func init() { // Arguments configures the otelcol.exporter.awss3 component. type Arguments struct { - Region string `alloy:"region,attr"` - S3Bucket string `alloy:"s3_bucket,attr"` - S3Prefix string `alloy:"s3_prefix,attr"` - S3Partition string `alloy:"s3_partition,attr,optional"` - RoleArn string `alloy:"role_arn,attr,optional"` - FilePrefix string `alloy:"file_prefix,attr,optional"` - Marshaler awss3exporter.MarshalerType `alloy:"marshaler,attr,optional"` - Encoding string `alloy:"encoding,attr,optional"` - EncodingFileExtension string `alloy:"encoding_file_ext,attr,optional"` - Endpoint string `alloy:"endpoint,attr"` - S3ForcePathStyle bool `alloy:"s3_force_path_style,attr,optional"` - DisableSSL bool `alloy:"disable_ssl,attr,optional"` - Compression configcompression.Type `alloy:"compression,attr,optional"` + Encoding string `alloy:"encoding,attr,optional"` + EncodingFileExtension string `alloy:"encoding_file_ext,attr,optional"` + + S3Uploader S3Uploader `alloy:"s3_uploader,block"` + MarshalerName MarshalerType `alloy:"marshaler,block,optional"` // DebugMetrics configures component internal metrics. Optional DebugMetrics otelcol.DebugMetricsArguments `alloy:"debug_metrics,block,optional"` @@ -50,29 +41,17 @@ type Arguments struct { var _ exporter.Arguments = Arguments{} func (args *Arguments) SetToDefault() { - *args = Arguments{ - Region: "us-east-1", - Marshaler: "otlp_json", - S3ForcePathStyle: false, - DisableSSL: false, - Compression: configcompression.TypeGzip, - } + + args.MarshalerName.SetToDefault() + args.S3Uploader.SetToDefault() } func (args Arguments) Convert() (otelcomponent.Config, error) { - input := make(map[string]interface{}) var result awss3exporter.Config - err := mapstructure.Decode(input, &result) - if err != nil { - return nil, err - } - result.S3Uploader.Region = args.Region - result.S3Uploader.S3Bucket = args.S3Bucket - result.S3Uploader.S3Prefix = args.S3Prefix - - result.MarshalerName = args.Marshaler + result.S3Uploader = args.S3Uploader.Convert() + result.MarshalerName = args.MarshalerName.Convert() return &result, nil } @@ -88,3 +67,54 @@ func (args Arguments) Exporters() map[otelcomponent.DataType]map[otelcomponent.I func (args Arguments) DebugMetricsConfig() otelcol.DebugMetricsArguments { return args.DebugMetrics } + +// S3 Uploader Arguments Block +type S3Uploader struct { + Region string `alloy:"region,attr,optional"` + S3Bucket string `alloy:"s3_bucket,attr"` + S3Prefix string `alloy:"s3_prefix,attr"` + S3Partition string `alloy:"s3_partition,attr,optional"` + RoleArn string `alloy:"role_arn,attr,optional"` + FilePrefix string `alloy:"file_prefix,attr,optional"` + Endpoint string `alloy:"endpoint,attr,optional"` + S3ForcePathStyle bool `alloy:"s3_force_path_style,attr,optional"` + DisableSSL bool `alloy:"disable_ssl,attr,optional"` + Compression configcompression.Type `alloy:"compression,attr,optional"` +} + +func (args *S3Uploader) SetToDefault() { + *args = S3Uploader{ + Region: "us-east-1", + S3ForcePathStyle: false, + DisableSSL: false, + } +} + +func (args *S3Uploader) Convert() awss3exporter.S3UploaderConfig { + return awss3exporter.S3UploaderConfig{ + Region: args.Region, + S3Bucket: args.S3Bucket, + S3Prefix: args.S3Prefix, + S3Partition: args.S3Partition, + FilePrefix: args.FilePrefix, + Endpoint: args.Endpoint, + RoleArn: args.RoleArn, + S3ForcePathStyle: args.S3ForcePathStyle, + DisableSSL: args.DisableSSL, + } +} + +// MarshalerType Argument Block +type MarshalerType struct { + Type string `alloy:"type,attr,optional"` +} + +func (args *MarshalerType) SetToDefault() { + *args = MarshalerType{ + Type: "otlp_json", + } +} + +func (args MarshalerType) Convert() awss3exporter.MarshalerType { + return awss3exporter.MarshalerType(args.Type) +} From 6fa677de1bc352d3c731114616080e9339377c58 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 1 May 2024 09:34:01 -0500 Subject: [PATCH 03/26] Added debug metrics block back --- docs/sources/reference/components/otelcol.exporter.awss3.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 7cf905367..d76623afb 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -91,6 +91,10 @@ Name | Type | Description ------------------------|------------|--------------------------------------------------------------------------------------------|---------|--------- `type` | `string` | Marshaler used to produce output data | `"otlp_json"` | no +### debug_metrics block + +{{< docs/shared lookup="reference/components/otelcol-debug-metrics-block.md" source="alloy" version="" >}} + ### Encoding Encoding overrides marshaler if present and sets to use an encoding extension defined in the collector configuration. From fe16f7782df799797c324715352a070bae2d869e Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 1 May 2024 09:39:16 -0500 Subject: [PATCH 04/26] Docs Clean up --- .../sources/reference/components/otelcol.exporter.awss3.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index d76623afb..15298fbd0 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -48,9 +48,6 @@ s3_uploader | [s3_uploader][] | Configures the AWS S3 bucket det marshaler | [marshaler][] | Marshaler used to produce output data. | no debug_metrics | [debug_metrics][] | Configures the metrics that this component generates to monitor its state. | no -The `>` symbol indicates deeper levels of nesting. For example, `client > tls` -refers to a `tls` block defined inside a `client` block. - [s3_uploader]: #s3_uploader-block [marshaler]: #marshaler-block [debug_metrics]: #debug_metrics-block @@ -127,7 +124,3 @@ information. * `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. - -## Examples - -The following examples show you how to create an exporter to send data to different destinations. From 945f1cc4c9d8c933cf972fb53446da9994c96b0a Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 1 May 2024 09:46:56 -0500 Subject: [PATCH 05/26] Added Public Preview snippet to docs Added exported fields section to docs --- .../components/otelcol.exporter.awss3.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 15298fbd0..833bf303b 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -4,8 +4,12 @@ description: Learn about otelcol.exporter.awss3 title: otelcol.exporter.awss3 --- +Public preview + # otelcol.exporter.awss3 +{{< docs/shared lookup="stability/public_preview.md" source="alloy" version="" >}} + `otelcol.exporter.awss3` accepts telemetry data from other `otelcol` components and writes them to an AWS S3 Bucket. @@ -103,6 +107,17 @@ See [https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main - `none` (default): No compression will be applied - `gzip`: Files will be compressed with gzip. **This does not support `sumo_ic`marshaler.** +## Exported fields + +The following fields are exported and can be referenced by other components: + +Name | Type | Description +--------|--------------------|----------------------------------------------------------------- +`input` | `otelcol.Consumer` | A 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 @@ -124,3 +139,18 @@ information. * `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. + + + +## Compatible components + +`otelcol.exporter.otlp` has exports that can be consumed by the following components: + +- Components that consume [OpenTelemetry `otelcol.Consumer`](../../compatibility/#opentelemetry-otelcolconsumer-consumers) + +{{< 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 >}} + + From 260a8529d9600632fc782e0583cf0753e76c912d Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Wed, 1 May 2024 10:47:06 -0500 Subject: [PATCH 06/26] Update changelog Update docs with example added a test --- CHANGELOG.md | 1 + .../components/otelcol.exporter.awss3.md | 38 ++++++++- go.sum | 2 - .../component/otelcol/exporter/awss3/awss3.go | 2 - .../otelcol/exporter/awss3/awss3_test.go | 77 +++++++++++++++++++ 5 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 internal/component/otelcol/exporter/awss3/awss3_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index ba555c739..2036b4e1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Main (unreleased) ### Features - (_Public preview_) Add support for setting GOMEMLIMIT based on cgroup setting. (@mattdurham) +- (_Experimental_) A new `otelcol.exporter.awss3` component for sending telemetry data to a S3 bucket. (@Imshelledin21) ### Enhancements diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 833bf303b..1188704eb 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -4,11 +4,11 @@ description: Learn about otelcol.exporter.awss3 title: otelcol.exporter.awss3 --- -Public preview +Experimental # otelcol.exporter.awss3 -{{< docs/shared lookup="stability/public_preview.md" source="alloy" version="" >}} +{{< docs/shared lookup="stability/experimental.md" source="alloy" version="" >}} `otelcol.exporter.awss3` accepts telemetry data from other `otelcol` components and writes them to an AWS S3 Bucket. @@ -140,6 +140,40 @@ information. * `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 diff --git a/go.sum b/go.sum index 55f5bbb4a..251933491 100644 --- a/go.sum +++ b/go.sum @@ -1072,8 +1072,6 @@ github.com/grafana/pyroscope-go/godeltaprof v0.1.7 h1:C11j63y7gymiW8VugJ9ZW0pWfx github.com/grafana/pyroscope-go/godeltaprof v0.1.7/go.mod h1:Tk376Nbldo4Cha9RgiU7ik8WKFkNpfds98aUzS8omLE= github.com/grafana/pyroscope/api v0.4.0 h1:J86DxoNeLOvtJhB1Cn65JMZkXe682D+RqeoIUiYc/eo= github.com/grafana/pyroscope/api v0.4.0/go.mod h1:MFnZNeUM4RDsDOnbgKW3GWoLSBpLzMMT9nkvhHHo81o= -github.com/grafana/pyroscope/ebpf v0.4.6-0.20240426163159-8575ca65f70b h1:BXLaXB9gPvlbPeiwOkauVFvf7iaZwqS+BYCmHiAue64= -github.com/grafana/pyroscope/ebpf v0.4.6-0.20240426163159-8575ca65f70b/go.mod h1:0iOWpGm2M6KXiP2nGa4wf02knSSjEtu11vpUOdQT5AY= github.com/grafana/pyroscope/ebpf v0.4.6 h1:8A6vddwCF2q8XXrOebFuDczr9xOHCfqPN2QwIkXKxgU= github.com/grafana/pyroscope/ebpf v0.4.6/go.mod h1:0iOWpGm2M6KXiP2nGa4wf02knSSjEtu11vpUOdQT5AY= github.com/grafana/regexp v0.0.0-20221123153739-15dc172cd2db h1:7aN5cccjIqCLTzedH7MZzRZt5/lsAHch6Z3L2ZGn5FA= diff --git a/internal/component/otelcol/exporter/awss3/awss3.go b/internal/component/otelcol/exporter/awss3/awss3.go index 24d644f1e..1092775a7 100644 --- a/internal/component/otelcol/exporter/awss3/awss3.go +++ b/internal/component/otelcol/exporter/awss3/awss3.go @@ -41,13 +41,11 @@ type Arguments struct { var _ exporter.Arguments = Arguments{} func (args *Arguments) SetToDefault() { - args.MarshalerName.SetToDefault() args.S3Uploader.SetToDefault() } func (args Arguments) Convert() (otelcomponent.Config, error) { - var result awss3exporter.Config result.S3Uploader = args.S3Uploader.Convert() diff --git a/internal/component/otelcol/exporter/awss3/awss3_test.go b/internal/component/otelcol/exporter/awss3/awss3_test.go new file mode 100644 index 000000000..29f7be7de --- /dev/null +++ b/internal/component/otelcol/exporter/awss3/awss3_test.go @@ -0,0 +1,77 @@ +package awss3_test + +import ( + "testing" + + "github.com/grafana/alloy/internal/component/otelcol" + "github.com/grafana/alloy/internal/component/otelcol/receiver/vcenter" + "github.com/grafana/alloy/syntax" + "github.com/stretchr/testify/require" +) + +func TestDebugMetricsConfig(t *testing.T) { + tests := []struct { + testName string + alloyCfg string + expected otelcol.DebugMetricsArguments + }{ + { + testName: "default", + alloyCfg: ` + endpoint = "http://localhost:1234" + username = "user" + password = "pass" + + output {} + `, + expected: otelcol.DebugMetricsArguments{ + DisableHighCardinalityMetrics: true, + }, + }, + { + testName: "explicit_false", + alloyCfg: ` + endpoint = "http://localhost:1234" + username = "user" + password = "pass" + + debug_metrics { + disable_high_cardinality_metrics = false + } + + output {} + `, + expected: otelcol.DebugMetricsArguments{ + DisableHighCardinalityMetrics: false, + }, + }, + { + testName: "explicit_true", + alloyCfg: ` + endpoint = "http://localhost:1234" + username = "user" + password = "pass" + + debug_metrics { + disable_high_cardinality_metrics = true + } + + output {} + `, + expected: otelcol.DebugMetricsArguments{ + DisableHighCardinalityMetrics: true, + }, + }, + } + + for _, tc := range tests { + t.Run(tc.testName, func(t *testing.T) { + var args vcenter.Arguments + require.NoError(t, syntax.Unmarshal([]byte(tc.alloyCfg), &args)) + _, err := args.Convert() + require.NoError(t, err) + + require.Equal(t, tc.expected, args.DebugMetricsConfig()) + }) + } +} From e54fc9275942770cc358710ae52638eb615940b4 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:23:52 -0500 Subject: [PATCH 07/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 1188704eb..c17ac028f 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -10,8 +10,7 @@ title: otelcol.exporter.awss3 {{< docs/shared lookup="stability/experimental.md" source="alloy" version="" >}} -`otelcol.exporter.awss3` accepts telemetry data from other `otelcol` components -and writes them to an AWS S3 Bucket. +`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 From a8cf6938b1b1899131def4e3be17384a638a2513 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:24:07 -0500 Subject: [PATCH 08/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- .../sources/reference/components/otelcol.exporter.awss3.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index c17ac028f..97ae6f29a 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -12,9 +12,10 @@ title: otelcol.exporter.awss3 `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. +{{< admonition type="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. +{{< /admonition >}} Multiple `otelcol.exporter.awss3` components can be specified by giving them different labels. From 5e07b6c77e090ea12642e445e4c42651ac092073 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:24:36 -0500 Subject: [PATCH 09/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 97ae6f29a..8cb01a014 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -17,8 +17,7 @@ title: otelcol.exporter.awss3 Bug reports or feature requests will be redirected to the upstream repository if necessary. {{< /admonition >}} -Multiple `otelcol.exporter.awss3` components can be specified by giving them -different labels. +You can specify multiple `otelcol.exporter.awss3` components by giving them different labels. ## Usage From d2efb0414f9ae50de8b349bacba1847dcfa0dbb2 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:25:17 -0500 Subject: [PATCH 10/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 8cb01a014..ba120c2b5 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -38,7 +38,7 @@ otelcol.exporter.awss3 "LABEL" { Name | Type | Description | Default | Required -----------|------------|--------------------------------------------------|---------|--------- `encoding` | `string` | Encoding extension to use to marshal data. Overrides the `marshaler` configuration option if set. | `""` | no -`encoding_file_ext` | `string` | file format extension suffix when using the `encoding` configuration option. May be left empty for no suffix to be appended. | `""` | no +`encoding_file_ext` | `string` | File format extension suffix when using the `encoding` configuration option. It can be left empty if a suffix shouldn't be appended. | `""` | no ## Blocks From e1624342e0715efb22c004379ae9d7c41b2a98eb Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:26:15 -0500 Subject: [PATCH 11/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index ba120c2b5..4d1891c4b 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -89,7 +89,7 @@ The following arguments are supported: Name | Type | Description | Default | Required ------------------------|------------|--------------------------------------------------------------------------------------------|---------|--------- -`type` | `string` | Marshaler used to produce output data | `"otlp_json"` | no +`type` | `string` | Marshaler used to produce output data. | `"otlp_json"` | no ### debug_metrics block From aa479d8168502c46ac399d34ee56c08057612f20 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:30:14 -0500 Subject: [PATCH 12/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 4d1891c4b..41beb816a 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -104,7 +104,7 @@ See [https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main ### Compression - `none` (default): No compression will be applied -- `gzip`: Files will be compressed with gzip. **This does not support `sumo_ic`marshaler.** +- `gzip`: Files will be compressed with gzip. **This doesn't support `sumo_ic`marshaler.** ## Exported fields From ba82e086d1ea3513a6b4cc6d3d7bd3953e1b81da Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:30:21 -0500 Subject: [PATCH 13/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 41beb816a..6731d07f9 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -124,7 +124,7 @@ configuration. ## Debug information -`otelcol.exporter.awss3` does not expose any component-specific debug +`otelcol.exporter.awss3` doesn't expose any component-specific debug information. ## Debug metrics From 5d81478ae2ea44ce7ae97ccf744cf58063053a5b Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:30:34 -0500 Subject: [PATCH 14/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 6731d07f9..87feee665 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -97,9 +97,11 @@ Name | Type | Description ### Encoding -Encoding overrides marshaler if present and sets to use an encoding extension defined in the collector configuration. +Encoding overrides the marshaler if it's present and sets it to use the encoding extension defined in the collector configuration. -See [https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding). +Refer to the Open Telemetry [encoding extensions] documentation for more information. + +[encoding]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/encoding ### Compression From 78717ae35676f8ba092abb3f5ed911914c9f19e8 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:30:43 -0500 Subject: [PATCH 15/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 87feee665..2180f2a94 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -133,8 +133,8 @@ information. * `exporter_sent_spans_ratio_total` (counter): Number of spans successfully sent to destination. * `exporter_send_failed_spans_ratio_total` (counter): Number of spans in failed attempts to send to destination. -* `exporter_queue_capacity_ratio` (gauge): Fixed capacity of the retry queue (in batches) -* `exporter_queue_size_ratio` (gauge): Current size of the retry queue (in batches) +* `exporter_queue_capacity_ratio` (gauge): Fixed capacity of the retry queue (in batches). +* `exporter_queue_size_ratio` (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. From 96af63008a0d19dda8b2aa1d9e2df5dd0ea3932c Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Mon, 6 May 2024 15:37:07 -0500 Subject: [PATCH 16/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- .../components/otelcol.exporter.awss3.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 2180f2a94..5fcb1a92f 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -63,17 +63,19 @@ The following arguments are supported: Name | Type | Description | Default | Required ----------------------|----------------------------|----------------------------------------------------------------------------------|--------------|--------- -`region` | `string` | AWS region. | `"us-east-1"`| no -`s3_bucket` | `string` | S3 bucket | | yes -`s3_prefix` | `string` | Prefix for the S3 key (root directory inside bucket). | | yes -`s3_partition` | `string` | Time granularity of S3 key: hour or minute | `"minute"` | no -`role_arn` | `string` | The Role ARN to be assumed | | no -`file_prefix` | `string` | File prefix defined by user | | no -`endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket` | | no -`s3_force_path_style` | `boolean` | [Set this to `true` to force the request to use path-style addressing](http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html) | `false` | no -`disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests | | `false` +`region` | `string` | The AWS region. | `"us-east-1"`| no +`s3_bucket` | `string` | The S3 bucket. | | yes +`s3_prefix` | `string` | Prefix for the S3 key (root directory inside the bucket). | | yes +`s3_partition` | `string` | Time granularity of S3 key: hour or minute. | `"minute"` | no +`role_arn` | `string` | The Role ARN to be assumed. | | no +`file_prefix` | `string` | The file prefix defined by the user. | | no +`endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket`. | | no +`s3_force_path_style` | `boolean` | Set this to `true` to force the request to use [path-style requests](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access) | `false` | no +`disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests | | `false` `compression` | `string` | should the file be compressed | `none` | no +[path-style requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access + ### marshaler block Marshaler determines the format of data sent to AWS S3. Currently, the following marshalers are implemented: From 2f7371828c06dbcdc498db0e195f8385037e986c Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Tue, 7 May 2024 09:10:43 -0500 Subject: [PATCH 17/26] aws s3 component set to `StabilityExperimental` Updates to docs --- docs/sources/reference/components/otelcol.exporter.awss3.md | 4 ++-- internal/component/otelcol/exporter/awss3/awss3.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index 5fcb1a92f..b642237b5 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -71,8 +71,8 @@ Name | Type | Description `file_prefix` | `string` | The file prefix defined by the user. | | no `endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket`. | | no `s3_force_path_style` | `boolean` | Set this to `true` to force the request to use [path-style requests](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access) | `false` | no -`disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests | | `false` -`compression` | `string` | should the file be compressed | `none` | no +`disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests. | | `false` +`compression` | `string` | How should the file be compressed? `none`, `gzip` | `none` | no [path-style requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access diff --git a/internal/component/otelcol/exporter/awss3/awss3.go b/internal/component/otelcol/exporter/awss3/awss3.go index 1092775a7..e7951f4f2 100644 --- a/internal/component/otelcol/exporter/awss3/awss3.go +++ b/internal/component/otelcol/exporter/awss3/awss3.go @@ -15,7 +15,7 @@ import ( func init() { component.Register(component.Registration{ Name: "otelcol.exporter.awss3", - Stability: featuregate.StabilityGenerallyAvailable, + Stability: featuregate.StabilityExperimental, Args: Arguments{}, Exports: otelcol.ConsumerExports{}, From fe72a37c023bb586d071dcd79e822270489f075a Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Thu, 30 May 2024 07:56:13 -0500 Subject: [PATCH 18/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index b642237b5..cdb9d606c 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -24,9 +24,9 @@ You can specify multiple `otelcol.exporter.awss3` components by giving them diff ```alloy otelcol.exporter.awss3 "LABEL" { s3_uploader { - region = "REGION" - s3_bucket = "BUCKET_NAME" - s3_prefix = "PREFIX" + region = "" + s3_bucket = "" + s3_prefix = "" } } ``` From 288451ad443bcb27e49663bbc269873504e85f82 Mon Sep 17 00:00:00 2001 From: Sheldon Jackson <5133739+Imshelledin21@users.noreply.github.com> Date: Thu, 30 May 2024 07:56:26 -0500 Subject: [PATCH 19/26] Update docs/sources/reference/components/otelcol.exporter.awss3.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- docs/sources/reference/components/otelcol.exporter.awss3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/components/otelcol.exporter.awss3.md b/docs/sources/reference/components/otelcol.exporter.awss3.md index cdb9d606c..07201164b 100644 --- a/docs/sources/reference/components/otelcol.exporter.awss3.md +++ b/docs/sources/reference/components/otelcol.exporter.awss3.md @@ -22,7 +22,7 @@ You can specify multiple `otelcol.exporter.awss3` components by giving them diff ## Usage ```alloy -otelcol.exporter.awss3 "LABEL" { +otelcol.exporter.awss3 "