Skip to content

Commit 49c2f56

Browse files
authoredJun 7, 2021
Specify result of Resource.merge error (#1726)
The specification currently states that merging Resources and aggregating ResourceDetectors results in an error, but does not say anything about the resource with which the program continues to operate. This change specifies that the resultant resource of these methods is undefined and the decision is left to each implementation.
1 parent 0c553ae commit 49c2f56

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ release.
4242
### Resource
4343

4444
- Add schema_url support to `Resource`. ([#1692](https://github.com/open-telemetry/opentelemetry-specification/pull/1692))
45+
- Clarify result of Resource merging and ResourceDetector aggregation in case of error. ([#1726](https://github.com/open-telemetry/opentelemetry-specification/pull/1726))
4546

4647
### Semantic Conventions
4748

‎specification/resource/sdk.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ The resulting resource will have the Schema URL calculated as follows:
8282
- Else if the Schema URLs of the old and updating resources are the same then
8383
that will be the Schema URL of the resulting resource,
8484
- Else this is a merging error (this is the case when the Schema URL of the old
85-
and updating resources are not empty and are different).
85+
and updating resources are not empty and are different). The resulting resource is
86+
undefined, and its contents are implementation-specific.
8687

8788
Required parameters:
8889

@@ -124,7 +125,8 @@ a semantic convention or if the detector does not know what attributes it will
124125
populate (e.g. the detector that reads the attributes from environment values
125126
will not know what Schema URL to use). If multiple detectors are combined and
126127
the detectors use different non-empty Schema URL it MUST be an error since it is
127-
impossible to merge such resources.
128+
impossible to merge such resources. The resulting resource is undefined, and its
129+
contents are implementation specific.
128130

129131
### Specifying resource information via an environment variable
130132

0 commit comments

Comments
 (0)
Please sign in to comment.