From 01df25965c060bdfa68c1d02d70535f38b3e49fa Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 16 Mar 2026 13:46:26 +0100 Subject: [PATCH 1/4] Define access to the effective Resource produced by declarative configuration Signed-off-by: Israel Blancas --- CHANGELOG.md | 4 ++++ specification/configuration/sdk.md | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49ad6ce4a5e..87b4ab89c61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ release. ### SDK Configuration +- Declarative configuration: add in-development guidance for exposing the + effective `Resource` returned by `Create`. + ([#4948](https://github.com/open-telemetry/opentelemetry-specification/issues/4948)) + ### Supplementary Guidelines ### OTEPs diff --git a/specification/configuration/sdk.md b/specification/configuration/sdk.md index 40d0fe5d0c8..5d4ea8301b4 100644 --- a/specification/configuration/sdk.md +++ b/specification/configuration/sdk.md @@ -252,11 +252,34 @@ Interpret configuration model and return SDK components. * [MeterProvider](../metrics/sdk.md#meterprovider) * [LoggerProvider](../logs/sdk.md#loggerprovider) * [Propagators](../context/api-propagators.md#composite-propagator) +* **Status**: [Development](../document-status.md) - + [Resource](../resource/sdk.md) - the effective resource associated with SDK + components returned by `Create` * **Status**: [Development](../document-status.md) - [ConfigProvider](#configprovider) The multiple responses MAY be returned using a tuple, or some other data structure encapsulating the components. +**Status**: [Development](../document-status.md) The effective `Resource` is +the `Resource` actually associated with the SDK +components produced by `Create`, after all resource-related configuration, +resource detection, and merging required during configuration interpretation +have been applied. + +The [TracerProvider](../trace/sdk.md#tracer-provider), +[MeterProvider](../metrics/sdk.md#meterprovider), and +[LoggerProvider](../logs/sdk.md#loggerprovider) returned by the same `Create` +invocation MUST be associated with this effective `Resource`. + +If the results of `Create` are returned in a structure encapsulating the top +level SDK components, that structure MUST provide access to the effective +`Resource`. + +Because [Resources](../resource/sdk.md) are immutable, any `Resource` returned +by `Create` MUST be read-only from the caller's perspective. Callers MUST NOT +be able to mutate the returned value in a way that changes the `Resource` +associated with the created SDK components. + Create requirements around default and null behavior are described below. Note that [`defaultBehavior` and `nullBehavior`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#json-schema-source-and-output) are defined in the configuration data model. From ceba7e698eaa957948f6d6b28dc6756b2913b7ca Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 18 Mar 2026 15:01:56 +0100 Subject: [PATCH 2/4] Apply feedback Signed-off-by: Israel Blancas --- specification/configuration/sdk.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/specification/configuration/sdk.md b/specification/configuration/sdk.md index 5d4ea8301b4..fce1502e523 100644 --- a/specification/configuration/sdk.md +++ b/specification/configuration/sdk.md @@ -275,11 +275,6 @@ If the results of `Create` are returned in a structure encapsulating the top level SDK components, that structure MUST provide access to the effective `Resource`. -Because [Resources](../resource/sdk.md) are immutable, any `Resource` returned -by `Create` MUST be read-only from the caller's perspective. Callers MUST NOT -be able to mutate the returned value in a way that changes the `Resource` -associated with the created SDK components. - Create requirements around default and null behavior are described below. Note that [`defaultBehavior` and `nullBehavior`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#json-schema-source-and-output) are defined in the configuration data model. From 9adfbaa6368e909a0da70a79b18274c7633bee02 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 19 Mar 2026 16:24:37 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Signed-off-by: Israel Blancas --- specification/configuration/sdk.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/specification/configuration/sdk.md b/specification/configuration/sdk.md index fce1502e523..ccab600a708 100644 --- a/specification/configuration/sdk.md +++ b/specification/configuration/sdk.md @@ -260,20 +260,7 @@ Interpret configuration model and return SDK components. The multiple responses MAY be returned using a tuple, or some other data structure encapsulating the components. -**Status**: [Development](../document-status.md) The effective `Resource` is -the `Resource` actually associated with the SDK -components produced by `Create`, after all resource-related configuration, -resource detection, and merging required during configuration interpretation -have been applied. - -The [TracerProvider](../trace/sdk.md#tracer-provider), -[MeterProvider](../metrics/sdk.md#meterprovider), and -[LoggerProvider](../logs/sdk.md#loggerprovider) returned by the same `Create` -invocation MUST be associated with this effective `Resource`. - -If the results of `Create` are returned in a structure encapsulating the top -level SDK components, that structure MUST provide access to the effective -`Resource`. +**Status**: [Development](../document-status.md) The resolved `Resource` associated with the `MeterProvider`, `LoggerProvider`, `TracerProvider`. Create requirements around default and null behavior are described below. Note that [`defaultBehavior` and `nullBehavior`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#json-schema-source-and-output) From ed038738bc794ccc32699e1d6a4afeef0a34cd96 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 25 Mar 2026 11:54:33 +0100 Subject: [PATCH 4/4] Apply feedback Signed-off-by: Israel Blancas --- specification/configuration/sdk.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/specification/configuration/sdk.md b/specification/configuration/sdk.md index ccab600a708..73354d88fe3 100644 --- a/specification/configuration/sdk.md +++ b/specification/configuration/sdk.md @@ -252,16 +252,13 @@ Interpret configuration model and return SDK components. * [MeterProvider](../metrics/sdk.md#meterprovider) * [LoggerProvider](../logs/sdk.md#loggerprovider) * [Propagators](../context/api-propagators.md#composite-propagator) -* **Status**: [Development](../document-status.md) - - [Resource](../resource/sdk.md) - the effective resource associated with SDK - components returned by `Create` +* **Status**: [Development](../document-status.md) The resolved `Resource` + associated with the `MeterProvider`, `LoggerProvider`, `TracerProvider`. * **Status**: [Development](../document-status.md) - [ConfigProvider](#configprovider) The multiple responses MAY be returned using a tuple, or some other data structure encapsulating the components. -**Status**: [Development](../document-status.md) The resolved `Resource` associated with the `MeterProvider`, `LoggerProvider`, `TracerProvider`. - Create requirements around default and null behavior are described below. Note that [`defaultBehavior` and `nullBehavior`](https://github.com/open-telemetry/opentelemetry-configuration/blob/main/CONTRIBUTING.md#json-schema-source-and-output) are defined in the configuration data model.