From 33f3dc2dbd873456d2b7097b3e0f3f4a1eb5ca14 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 27 Jan 2026 17:00:14 +0100 Subject: [PATCH 1/4] Refine the handling of OTEL_RESOURCE_ATTRIBUTES. --- specification/resource/sdk.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/resource/sdk.md b/specification/resource/sdk.md index 8a9a08b4cb0..61d1d8ae541 100644 --- a/specification/resource/sdk.md +++ b/specification/resource/sdk.md @@ -186,7 +186,10 @@ key value pairs, and these are expected to be represented in a format matching to the [W3C Baggage](https://www.w3.org/TR/baggage/#header-content), except that additional semi-colon delimited metadata is not supported, i.e.: `key1=value1,key2=value2`. All attribute values MUST be considered strings and characters outside the -`baggage-octet` range MUST be percent-encoded. +`baggage-octet` range SHOULD be percent-encoded. In the case of errors during the +decoding process, the entire environment variable value SHOULD be discarded +and an error SHOULD be reported following the +[Error Handling principles](../error-handling.md#basic-error-handling-principles) ## Resource operations From cda6781df799b6b1b37e50575d0c0ffe8ce250c4 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 27 Jan 2026 17:11:28 +0100 Subject: [PATCH 2/4] Update specification/resource/sdk.md Co-authored-by: Reiley Yang --- specification/resource/sdk.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/resource/sdk.md b/specification/resource/sdk.md index 61d1d8ae541..20fbee283e6 100644 --- a/specification/resource/sdk.md +++ b/specification/resource/sdk.md @@ -189,7 +189,7 @@ All attribute values MUST be considered strings and characters outside the `baggage-octet` range SHOULD be percent-encoded. In the case of errors during the decoding process, the entire environment variable value SHOULD be discarded and an error SHOULD be reported following the -[Error Handling principles](../error-handling.md#basic-error-handling-principles) +[Error Handling principles](../error-handling.md#basic-error-handling-principles). ## Resource operations From 7ec7352c4fe07ffe089555d00748b543d2f22b5e Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Wed, 28 Jan 2026 17:10:40 +0100 Subject: [PATCH 3/4] Add CHANGELOG. --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cafe951dd70..eaf0608f95d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ release. ### Resource +- Refine the handling of OTEL_RESOURCE_ATTRIBUTES. + ([#4856](https://github.com/open-telemetry/opentelemetry-specification/pull/4856)) + ### Entities ### OpenTelemetry Protocol From 06bf8529582a133ba669882e19cdd06927d82402 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 30 Jan 2026 17:53:01 +0100 Subject: [PATCH 4/4] Massage the changes. --- specification/resource/sdk.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/specification/resource/sdk.md b/specification/resource/sdk.md index 20fbee283e6..5fcfcaa742f 100644 --- a/specification/resource/sdk.md +++ b/specification/resource/sdk.md @@ -182,13 +182,14 @@ information provided by the user, i.e. the user provided resource information has higher priority. The `OTEL_RESOURCE_ATTRIBUTES` environment variable will contain of a list of -key value pairs, and these are expected to be represented in a format matching -to the [W3C Baggage](https://www.w3.org/TR/baggage/#header-content), except that additional -semi-colon delimited metadata is not supported, i.e.: `key1=value1,key2=value2`. -All attribute values MUST be considered strings and characters outside the -`baggage-octet` range SHOULD be percent-encoded. In the case of errors during the -decoding process, the entire environment variable value SHOULD be discarded -and an error SHOULD be reported following the +key value pairs, represented as `key1=value1,key2=value2`. +All attribute values MUST be considered strings. The `,` and `=` characters +in keys and values MUST be percent encoded. Other characters MAY be +[percent-encoded](https://datatracker.ietf.org/doc/html/rfc3986#section-2.1), +e.g. values outside the ANSI characters set. + +In case of any error, e.g. failure during the decoding process, the entire environment +variable value SHOULD be discarded and an error SHOULD be reported following the [Error Handling principles](../error-handling.md#basic-error-handling-principles). ## Resource operations