Skip to content

Update Alloy based on enhancements and bugfixes from OTel 0.127.0 & 0.128.0 #3914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Bugfixes

- Upgrade `otelcol` components from OpenTelemetry v0.126.0 to v0.128.0 (@korniltsev, @dehaansa)
- [`kafkaexporter`]: Allow kafka exporter to produce to topics based on metadata key values (#39208)
- [`kafkareceiver`]: enforce a backoff mechanism on non-permanent errors, such as when the queue is full (#39580)
- [`kafkareceiver`]: Don't restart the Kafka consumer on failed errors when message marking is enabled for them. (#39909)
- [`datadogexporter`]: Fix automatic intial point dropping when converting cumulative monotonic sum metrics (#40426)
- [`datadogexporter`]: config `tls::insecure_skip_verify` is now taken into account in metrics path. (#40507, #40085)
- [`datadogexporter`]: Correctly treat summary counts as cumulative monotonic sums instead of cumulative non-monotonic sums (#40176)
- [`spanmetricsconnector`]: Fix bug causing span metrics calls count to be always 0 when using delta temporality (#40139)
- [`splunkhecexporter`]: Treat HTTP 403 Forbidden as a permanent error. (#39037)

### Features

- (_Experimental_) Add an `array.group_by` stdlib function to group items in an array by a key. (@wildum)
Expand All @@ -35,12 +47,21 @@ Main (unreleased)

- Wire in survey block for beyla.ebpf component. (@grcevski, @tpaschalis)

- Upgrade `otelcol` components from OpenTelemetry v0.126.0 to v0.128.0 (@korniltsev, @dehaansa)
- [`resourcedetectionprocessor`]: Add additional OS properties to resource detection: `os.build.id` and `os.name` (#39941)
- [`resourcedetectionprocessor`]: add `host.interface` resource attribute to `system` detector (#39419)
- [`kafkaexporter`]: Fix Snappy compression codec support for the Kafka exporter (#40288)
- [`filelogreceiver`]: Introduce `utf8-raw` encoding to avoid replacing invalid bytes with \uFFFD when reading UTF-8 input. (#39653)
- [`k8sattributesprocessor`]: Support extracting labels and annotations from k8s Deployments (#37957)
- [`k8sattributesprocessor`]: Add option to configure automatic service resource attributes (#37114)
- [`datadogexporter`]: Adds `hostname_detection_timeout` configuration option for Datadog Exporter and sets default to 25 seconds. (#40373, #40377)
- [`datadogreceiver`]: Address semantic conventions noncompliance and add support for http/db (#36924)
- [`awss3exporter`]: Add the retry mode, max attempts and max backoff to the settings (#36264)

### Other changes

- Mark `pyroscope.receive_http` and `pyroscope.relabel` components as GA. (@marcsanmi)

- Upgrade `otelcol` components from OpenTelemetry v0.126.0 to v0.128.0 (@korniltsev)

v1.9.2
-----------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,27 @@ The `s3_uploader` block configures the AWS S3 bucket details used by the compone

The following arguments are supported:

| Name | Type | Description | Default | Required |
| --------------------- | --------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------- |
| `s3_bucket` | `string` | The S3 bucket. | | yes |
| `s3_prefix` | `string` | Prefix for the S3 key (root directory inside the bucket). | | yes |
| `acl` | `string` | The canned ACL to use when uploading objects. | `"private"` | no |
| `compression` | `string` | File compression method, `none` or `gzip` | `"none"` | no |
| `disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests. | `false` | no |
| `endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket`. | | no |
| `file_prefix` | `string` | The file prefix defined by the user. | | no |
| `region` | `string` | The AWS region. | `"us-east-1"` | no |
| `role_arn` | `string` | The Role ARN to be assumed. | | no |
| `s3_force_path_style` | `boolean` | Set this to `true` to force the request to use [path-style requests][] | `false` | no |
| `s3_partition_format` | `string` | Filepath formatting for the partition; Refer to [`strftime`][strftime] for format specification. | `"year=%Y/month=%m/day=%d/hour=%H/minute=%M"` | no |
| `storage_class` | `string` | The storage class to use when uploading objects. | `"STANDARD"` | no |
| Name | Type | Description | Default | Required |
| --------------------- | ---------- | ----------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------- |
| `s3_bucket` | `string` | The S3 bucket. | | yes |
| `s3_prefix` | `string` | Prefix for the S3 key (root directory inside the bucket). | | yes |
| `acl` | `string` | The canned ACL to use when uploading objects. | `"private"` | no |
| `compression` | `string` | File compression method, `none` or `gzip` | `"none"` | no |
| `disable_ssl` | `boolean` | Set this to `true` to disable SSL when sending requests. | `false` | no |
| `endpoint` | `string` | Overrides the endpoint used by the exporter instead of constructing it from `region` and `s3_bucket`. | | no |
| `file_prefix` | `string` | The file prefix defined by the user. | | no |
| `region` | `string` | The AWS region. | `"us-east-1"` | no |
| `retry_max_attempts` | `int` | The max number of attempts for retrying a request. | `3` | no |
| `retry_max_backoff` | `duration` | The max backoff delay that can occur before retrying a request. | `20s` | no |
| `retry_mode` | `string` | The retryer implementation. | `"standard"` | no |
| `role_arn` | `string` | The Role ARN to be assumed. | | no |
| `s3_force_path_style` | `boolean` | Set this to `true` to force the request to use [path-style requests][] | `false` | no |
| `s3_partition_format` | `string` | Filepath formatting for the partition; Refer to [`strftime`][strftime] for format specification. | `"year=%Y/month=%m/day=%d/hour=%H/minute=%M"` | no |
| `storage_class` | `string` | The storage class to use when uploading objects. | `"STANDARD"` | no |

`retry_mode` must be one of `standard`, `adaptive`, or `nop`.
If `retry_mode` is set to `nop`, the `aws.NopRetryer` implementation effectively disables the retry.
Setting `retry_max_attempts` to 0 will allow the SDK to retry all retryable errors until the request succeeds, or a non-retryable error is returned.

[path-style requests]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access
[strftime]: https://www.man7.org/linux/man-pages/man3/strftime.3.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ otelcol.exporter.datadog "<LABEL>" {

You can use the following arguments with `otelcol.exporter.datadog`:

| Name | Type | Description | Default | Required |
| --------------- | -------- | -------------------------------------------------------------------------------- | ------- | -------- |
| `hostname` | `string` | The fallback hostname used for payloads without hostname-identifying attributes. | | no |
| `only_metadata` | `bool` | Whether to send only metadata. | `false` | no |
| Name | Type | Description | Default | Required |
| ---------------------------- | ---------- | -------------------------------------------------------------------------------- | ------- | -------- |
| `hostname` | `string` | The fallback hostname used for payloads without hostname-identifying attributes. | | no |
| `hostname_detection_timeout` | `duration` | The timeout for hostname detection. | `25s` | no |
| `only_metadata` | `bool` | Whether to send only metadata. | `false` | no |

If `hostname` is unset, the hostname is determined automatically.
For more information, refer to the Datadog [Fallback hostname logic](https://docs.datadoghq.com/opentelemetry/schema_semantics/hostname/?tab=datadogexporter#fallback-hostname-logic) documentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The following argument is supported:

| Name | Type | Description | Default | Required |
| -------------------- | -------- | --------------------------------------------------- | --------- | -------- |
| `level` | `int` | The level of compression to use on messages. | `-1` | no |
| `level` | `int` | The level of compression to use on messages. | `0` | no |

The following levels are valid combinations of `compression` and `level`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ The `extract` block configures which metadata, annotations, and labels to extrac

The following attributes are supported:

| Name | Type | Description | Default | Required |
| ------------------ | -------------- | ------------------------------------------------------- | ----------- | -------- |
| `metadata` | `list(string)` | Pre-configured metadata keys to add. | _See below_ | no |
| `otel_annotations` | `bool` | Whether to set the [recommended resource attributes][]. | `false` | no |
| Name | Type | Description | Default | Required |
| ------------------ | -------------- | --------------------------------------------------------------------------- | ----------- | -------- |
| `metadata` | `list(string)` | Pre-configured metadata keys to add. | _See below_ | no |
| `otel_annotations` | `bool` | Whether to set the [recommended resource attributes][semantic conventions]. | `false` | no |

The supported `metadata` keys are:

Expand All @@ -171,6 +171,12 @@ The supported `metadata` keys are:
* `k8s.replicaset.uid`
* `k8s.statefulset.name`
* `k8s.statefulset.uid`
* `service.instance.id` *
* `service.name` *
* `service.namespace` *
* `service.version` *

The `service.*` metadata are calculated following the OpenTelemetry [semantic conventions][].

By default, if `metadata` isn't specified, the following fields are extracted and added to spans, metrics, and logs as resource attributes:

Expand All @@ -186,7 +192,7 @@ By default, if `metadata` isn't specified, the following fields are extracted an

When `otel_annotations` is set to `true`, annotations such as `resource.opentelemetry.io/exampleResource` will be translated to the `exampleResource` resource attribute, etc.

[recommended resource attributes]: https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-attributes/
[semantic conventions]: https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-attributes

### `annotation`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,10 +871,13 @@ The `resource_attributes` block supports the following blocks:
| [`host.cpu.stepping`][res-attr-cfg] | Toggles the `host.cpu.stepping` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.cpu.vendor.id`][res-attr-cfg] | Toggles the `host.cpu.vendor.id` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.id`][res-attr-cfg] | Toggles the `host.id` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.interface`][res-attr-cfg] | Toggles the `host.interface` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.ip`][res-attr-cfg] | Toggles the `host.ip` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.mac`][res-attr-cfg] | Toggles the `host.mac` resource attribute. Sets `enabled` to `false` by default. | no |
| [`host.name`][res-attr-cfg] | Toggles the `host.name` resource attribute. Sets `enabled` to `true` by default. | no |
| [`os.build.id`][res-attr-cfg] | Toggles the `os.build.id` resource attribute. Sets `enabled` to `false` by default. | no |
| [`os.description`][res-attr-cfg] | Toggles the `os.description` resource attribute. Sets `enabled` to `false` by default. | no |
| [`os.name`][res-attr-cfg] | Toggles the `os.name` resource attribute. Sets `enabled` to `false` by default. | no |
| [`os.type`][res-attr-cfg] | Toggles the `os.type` resource attribute. Sets `enabled` to `true` by default. | no |
| [`os.version`][res-attr-cfg] | Toggles the `os.version` resource attribute. Sets `enabled` to `false` by default. | no |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You can use the following arguments with `otelcol.receiver.filelog`:
| `start_at` | `string` | The position to start reading the file from. | `"end"` | no |
| `storage` | `capsule(otelcol.Handler)` | Handler from an `otelcol.storage` component to use for persisting state. | | no |

`encoding` must be one of `utf-8`, `utf-16le`, `utf-16be`, `ascii`, `big5`, or `nop`.
`encoding` must be one of `utf-8`, `utf8-raw`, `utf-16le`, `utf-16be`, `ascii`, `big5`, or `nop`.
Refer to the upstream receiver [documentation][encoding-documentation] for more details.

`start_at` must be one of `beginning` or `end`. The `header` block may only be used if `start_at` is `beginning`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ extract {

These rules add the `component` and `version` tags to the spans or metrics.

You can set the `from` attribute to either `"pod"` or `"namespace"`.
You can set the `from` attribute to `"pod"`, `"namespace"`, `"node"`, or `"deployment"`.
14 changes: 10 additions & 4 deletions internal/component/otelcol/exporter/awss3/awss3.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ type S3Uploader struct {
Compression configcompression.Type `alloy:"compression,attr,optional"`
ACL string `alloy:"acl,attr,optional"`
StorageClass string `alloy:"storage_class,attr,optional"`

RetryMode string `alloy:"retry_mode,attr,optional"`
RetryMaxAttempts int `alloy:"retry_max_attempts,attr,optional"`
RetryMaxBackoff time.Duration `alloy:"retry_max_backoff,attr,optional"`
}

func (args *S3Uploader) SetToDefault() {
Expand All @@ -138,6 +142,9 @@ func (args *S3Uploader) SetToDefault() {
S3PartitionFormat: "year=%Y/month=%m/day=%d/hour=%H/minute=%M",
Compression: "none",
StorageClass: "STANDARD",
RetryMode: awss3exporter.DefaultRetryMode,
RetryMaxAttempts: awss3exporter.DefaultRetryMaxAttempts,
RetryMaxBackoff: awss3exporter.DefaultRetryMaxBackoff,
}
}

Expand All @@ -155,10 +162,9 @@ func (args *S3Uploader) Convert() awss3exporter.S3UploaderConfig {
Compression: args.Compression,
ACL: args.ACL,
StorageClass: args.StorageClass,
// todo: allow configuring retries https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/39509
RetryMode: awss3exporter.DefaultRetryMode,
RetryMaxAttempts: awss3exporter.DefaultRetryMaxAttempts,
RetryMaxBackoff: awss3exporter.DefaultRetryMaxBackoff,
RetryMode: args.RetryMode,
RetryMaxAttempts: args.RetryMaxAttempts,
RetryMaxBackoff: args.RetryMaxBackoff,
}
}

Expand Down
Loading