# OpenTelemetry v0.166.0

2026-11-23 · [Original release notes](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.166.0) · [Full summary](https://ratatosk.io/en/releases/opentelemetry/v0.166.0)

Security 13 · Breaking changes 2 · Important fixes 6 · Enhancements 8 · Other changes 7

## Security (13)

### [Security status unclear] Builder rejects invalid `dist.name` values

- Affects: `cmd/builder` configurations with path-like or control-character `dist.name` values (Inferred)

When `dist.name` was path-like, `go build -o` could write the binary outside `dist.output_path`; the builder now returns a validation error for path-like names and names containing control characters.

> - `cmd/builder`: Using invalid characters in `dist.name` (`.`, `/`) now return an error. (#16416)

### `cmd/builder` rejects symlinks at generated-file paths

- Affects: `cmd/builder` output paths with symlinks at generated-file paths (Inferred)

Previously, the builder followed a symlink at a generated file's path, which could redirect the write outside the output path. Now generation returns an error instead of writing through that symlink.

> - `cmd/builder`: The builder now fails with an error instead of following such a symlink. (#16401)

### Internal HTTP telemetry uses the configured server endpoint

- Affects: HTTP servers configured through `pkg/confighttp` that generate internal telemetry (Inferred)

When `ServerName` was unset, the request's `Host` header was recorded in internal telemetry, even for requests rejected by authentication. Now `server.address` and `server.port` come from the configured endpoint.

> - `pkg/confighttp`: Set `ServerName` on the internal telemetry generated instead of the request's `Host` header. (#16433)

### TPM TLS authentication values now redact on marshaling

- Affects: TPM-backed TLS configurations using `tpm::auth` or `tpm::owner_auth` (Inferred)

Previously, `tpm::auth` and `tpm::owner_auth` were plain strings and were not redacted like `key_pem`. Marshaling a config containing either field now shows its value as `[REDACTED]` without a configuration change; the end-user experience stays the same.

> - `pkg/configtls`: Update `tpm::auth` and `tpm::owner_auth` fields as opaque so they are redacted like `key_pem`. (#16435)
> - `pkg/configtls`: Update `tpm::auth` and `tpm::owner_auth` fields as opaque so they are redacted like `key_pem`. (#16435)

### OpAMP snapshot masking for omitted configuration values fixed

- Affects: OpAMP extension with `reports_raw_config` enabled

Inline secrets below sections disabled with `enabled: false` or zero-valued `omitempty` fields were reported verbatim when those sections or fields were absent from the marshaled configuration. Those leaves are now masked in the snapshot; nulls, booleans, and plain `${...}` provider references remain visible.

> - `pkg/otelcol`: Redact values below sections disabled with `enabled: false` in the unexpanded configuration snapshot reported by the OpAMP extension when `reports_raw_config` is enabled (#16441)
>   `ConfigSnapshot.Unexpanded()` learns which leaves are opaque from the marshaled configuration.
>   A section disabled with `enabled: false` and an `omitempty` field set to its zero value are not
>   marshaled, so inline secrets below them were reported verbatim.
>   Every leaf without a counterpart in the marshaled configuration is now masked; nulls, booleans
>   and plain `${...}` provider references stay visible.

### Builder rejects invalid configuration values

- Affects: `cmd/builder` configurations (Inferred)

Module names must be Go identifiers, and import paths and `gomod` path portions must be valid import paths. The specified module, distribution, replacement, and exclusion values must not contain the described control characters or span lines; the same module validation applies to telemetry.

> - `cmd/builder`: Provide additional validation in processing templates. (#16402)

### OTLP HTTP exporter bounds upstream error details

- Affects: setups using the OTLP HTTP exporter

When an upstream error response contains deeply nested or oversized status details, formatting previously recursively decoded `google.protobuf.Any` values without a depth bound. The exporter now limits nesting to 8, each decoded detail to 64 KiB, and the total to 32; details over those limits are reduced to their type URL.

> - `exporter/otlp_http`: Limit response size parsed by the exporter from upstream errors. (#16407)

### [Security status unclear] OTLP HTTP exporter hang on `HTTP 101` fixed

- Affects: setups using the OTLP HTTP exporter that receive `HTTP 101` responses from an upstream endpoint

Reading the response body blocked the export indefinitely. The exporter now closes the body without reading it and returns the `HTTP 101` status error.

> - `exporter/otlp_http`: Do not read the body of a `HTTP 101` response, which blocked the export forever. (#16460)

### Cookie storage bounded for `pkg/confighttp` clients

- Affects: `pkg/confighttp` clients with `cookies` enabled

A hostile backend could make the unbounded jar consume additional memory by sending cookies. The jar now skips cookies larger than 4096 bytes and, if adding a response's cookies would exceed 3000 distinct cookies, clears stored cookies before storing that response's eligible cookies.

> - `pkg/confighttp`: Bound the cookie jar used by clients with `cookies` enabled. (#16421)

### Response header limit added to confighttp clients

- Affects: clients created by `pkg/confighttp`’s `ClientConfig.ToClient`

Previously, a server could send large response headers that caused well over 100 MiB of header-map memory use per in-flight request. Response headers over 1 MiB now cause the client request to return an error.

> - `pkg/confighttp`: Limit the response headers accepted by clients created by `ClientConfig.ToClient` to 1 MiB (`http.DefaultMaxHeaderBytes`). (#16423)

### `provider/http` URI password redaction in errors

- Affects: `provider/http` setups using URIs that contain a password (Inferred)

Errors previously included the raw URI, potentially exposing its password, even when URI parsing failed. Errors now quote a redacted URI, and errors for unparsable URIs omit the raw URI.

> - `provider/http`: Redact password in URI when it is being logged. (#16418)

### [Security status unclear] Upstream error response size limit in `receiver/otlp`

- Affects: setups using `receiver/otlp` with JSON clients (Inferred)

When an exporter error contains deeply nested `google.protobuf.Any` status details and is encoded for a JSON client, recursive expansion can exhaust collector memory. On upstream errors, `receiver/otlp` now parses only a limited response size from the exporter; the limit value is not specified.

> - `receiver/otlp`: Limit response size parsed by the receiver from the exporter when it receives upstream errors. (#16407)

### Bounded `receiver/otlp` shutdown wait

- Affects: the `receiver/otlp` receiver with HTTP or gRPC servers

A peer holding an incomplete request open during shutdown or config reload could block it indefinitely. Now HTTP waits for at most the greater of the configured read and write timeouts plus 30 seconds, while gRPC waits for up to 30 seconds; an earlier caller deadline is honored, and when the bound expires, remaining connections are closed or stopped and their requests or RPCs are canceled.

> - `receiver/otlp`: Bound the time `Shutdown` waits for in-flight requests so that a peer holding an incomplete request open cannot block collector shutdown or config reload indefinitely. (#16462)

## Breaking changes (2)

### OTLP gRPC exporter sets a 64 KiB limit on backend response headers and trailers

- Affects: setups using the OTLP gRPC exporter

Backend responses with headers or trailers over 64 KiB now cause the export to fail permanently.

> - `exporter/otlp_grpc`: Bound the response headers and trailers accepted from the backend to 64 KiB. (#16415)

### `pkg/exporterhelper` changes `storageID` to optional

- Affects: setups using `pkg/exporterhelper` and its `storageID` configuration or API (Inferred)

Previously, `StorageID` used a pointer; it now uses `configoptional.Optional` with the new configstorage module.

> - `pkg/exporterhelper`: Change the storageID to use optional and use the new configstorage module (#13822)

## Important fixes (6)

### Receiver telemetry added for `NewProfilesController` profile scrapes

- Affects: setups using `pkg/xscraperhelper`'s `NewProfilesController` to scrape profiles

The profiles scraper controller previously consumed scraped profiles without reporting receiver telemetry. They now appear in receiver observability, including the receiver operation span and the `receiver/receiver/ProfilesReceived` and `otelcol_receiver_accepted_profile_samples` metrics.

> - `pkg/xscraperhelper`: Report receiver telemetry for profiles scraped by `NewProfilesController`, as is done for the other signals. (#16399)

### HTTP and HTTPS config retrieval in `pkg/confmap` honors context cancellation and deadlines

- Affects: HTTP and HTTPS configuration retrieval through `pkg/confmap` (Inferred)

When the server accepted a connection but never responded, `Retrieve` blocked forever, even after cancellation, because the providers ignored its context.

> - `pkg/confmap`: Honor context cancellation and deadlines when retrieving configuration over HTTP and HTTPS. (#16351)

### Backend throttle delays capped in `pkg/exporterhelper` retries

- Affects: retry handling in `pkg/exporterhelper` with backend throttle delays (Inferred)

Backend-provided throttle delays are capped at the configured `max_interval`.

> - `pkg/exporterhelper`: Limit retry backoff delay to the `max_interval` configured. (#16417)

### Partial reload handling for shared-signal receivers fixed

- Affects: setups using partial receiver reloads

When a receiver is added, removed, or rebuilt for one signal during a partial reload, a receiver sharing one instance across signals, such as `otlp`, keeps serving its other signals.

> - `pkg/service`: Rebuild a receiver for all of its signals when it is added, removed or rebuilt for one of them during a partial receiver reload, so that a receiver sharing one instance across signals, such as `otlp`, keeps serving the others. (#16260)

### OTLP invalid UTF-8 rejection feature gate added

- Affects: OTLP receiver setups with `receiver.otlp.rejectInvalidUTF8` enabled

Previously, the OTLP receiver forwarded requests containing invalid UTF-8 downstream. With the gate enabled, it rejects invalid items at the smallest supported signal unit and reports them through OTLP partial success counts; for profiles, an invalid string in the shared profiles dictionary rejects every profile in the request.

> - `receiver/otlp`: Add `receiver.otlp.rejectInvalidUTF8` feature gate to reject invalid UTF-8 in OTLP requests instead of forwarding invalid data downstream (#11449)
>   This behavior is behind the `receiver.otlp.rejectInvalidUTF8` feature gate.
>   When enabled, the OTLP receiver validates incoming traces, metrics, logs, and profiles for invalid UTF-8.
>   Invalid items are rejected at the smallest supported signal unit and reported through OTLP partial success counts.
>   For profiles, an invalid string in the shared profiles dictionary rejects every profile in the request because the dictionary cannot be attributed to a single profile.

### `SanitizeUTF8` added to OTLP `ExportRequest` types

- Affects: OTLP `ExportRequest` types in `pkg/pdata`

When spans containing invalid data are batched with valid data, ingestion fails and some valid data is lost.

> - `pkg/pdata`: Add `SanitizeUTF8` to the OTLP `ExportRequest` types to replace invalid UTF-8 byte sequences in all string fields with `U+FFFD` (#11449)

## Enhancements (8)

- Resolved address shuffling for gRPC `pick_first` clients (To use: Enable the `pick_first.shuffle_address_list` option; it is disabled by default.)
- `pkg/configmiddleware` enables extensions to create HTTP and gRPC server listeners
- OTLP receiver sanitizes invalid UTF-8 (To use: `receiver.otlp.sanitizeInvalidUTF8` feature gate)
- `ocbplugin` package added for OCB hooks plugins
- `cmd/mdatagen` adds an internal status class option
- Constant-time `Equal` method for `configopaque.String`
- UTF-8 checks and invalid-data removal for OTLP export requests
- `PipelineID` added to `processor.Settings`

## Other changes (7)

- Collector startup log gains a `FIPS140` field
- Safe quoting of generated Go string values in `cmd/builder`
- Telemetry metric stability schema and missing-stability error fixed in `cmd/mdatagen`
- Go string escaping in `cmd/mdatagen` output
- mdatagen rejects invalid generated package names
- OTLP gRPC exporter limits partial-success error messages to 1 KiB
- `cmd/mdatagen` adds metric migration options

---

Summaries are produced by AI, so they can be wrong, and they are provided without warranty.
