Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sdk-metrics] [sdk-trace] ensure resource is not auto-merged with default when it is provided to constructor #4673

Open
5 tasks
pichlermarc opened this issue May 3, 2024 · 1 comment
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

Comments

@pichlermarc
Copy link
Member

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:

The SDK MUST provide access to a Resource with at least the attributes listed at
Semantic Attributes with SDK-provided Default Value.
This resource MUST be associated with a TracerProvider or MeterProvider
if another resource was not explicitly specified.

A later section states that:

Note: This means that it is possible to create and associate a resource that
does not have all or any of the SDK-provided attributes present.

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 in sdk-metrics
  • Resource.default() is not auto-merged with the constructor-provided resource in sdk-trace-base
  • Resource.default() is not auto-merged with the constructor-provided resource in sdk-trace-node
  • Resource.default() is not auto-merged with the constructor-provided resource in sdk-trace-web
  • TBD: if any other SDK packages are stable by the time we work on this, also align them with the specification.

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:

@pichlermarc pichlermarc added spec-feature This is a request to implement a new feature which is already specified by the OTel specification pkg:sdk-metrics pkg:sdk-trace-base pkg:sdk-trace-node pkg:sdk-trace-web type:feature-tracking A feature with sub-issues that need to be addressed labels May 3, 2024
Copy link

github-actions bot commented Jul 8, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant