[sdk-metrics] [sdk-trace] ensure resource is not auto-merged with default when it is provided to constructor #4673
Labels
never-stale
pkg:sdk-metrics
pkg:sdk-trace-base
pkg:sdk-trace-node
pkg:sdk-trace-web
spec-feature
This is a request to implement a new feature which is already specified by the OTel specification
type:feature-tracking
A feature with sub-issues that need to be addressed
Description
Currently we always merge
Resource.default()
with the constructor-provided resource. However, the spec states that this should only happen when no resource is provided:A later section states that:
The goal of this issue is to change the resource handling trace and metrics SDKs to be spec-compliant.
This issue is considered done when:
Resource.default()
is not auto-merged with the constructor-provided resource insdk-metrics
Resource.default()
is not auto-merged with the constructor-provided resource insdk-trace-base
Resource.default()
is not auto-merged with the constructor-provided resource insdk-trace-node
Resource.default()
is not auto-merged with the constructor-provided resource insdk-trace-web
NOTE: if this is not applicable for one of the packages listed above when this issue is being implemented, state why this is the case in a comment, and link that comment below the list item before ticking the checkbox. Otherwise link the PR.
Additional resources:
Links to non-spec-compliant sections:
opentelemetry-js/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts
Line 83 in 47444f2
opentelemetry-js/packages/sdk-metrics/src/MeterProvider.ts
Lines 49 to 51 in 0f6518d
The text was updated successfully, but these errors were encountered: