Skip to content

What should be the schema URL merge behavior when a resource is empty (no attributes) #3710

@joaopgrassi

Description

@joaopgrassi

The Merge section of the Resource SDK specification, describes how the schemaURL of two resources should be merged. But it is unclear what should happen if one of the merging resources is empty, meaning, has 0 attributes but a non-empty schema url.

For ex, given this scenario:

  • Old resource: has attributes and empty schemaUrl
  • Updating resource: has 0 attributes and schemaUrl: https://opentelemetry.io/docs/specs/otel/schemas/v1.2.0

According with the merge behavior, the resulting resource should receive the schema url of the updating resource.

I wonder if this is correct? Given the resource that will influence the ultimate schema has no attributes, would it be better if, in that case, no schema would be set? Or should the schema be set regardless?

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec:resourceRelated to the specification/resource directorytriage:accepted:needs-sponsorReady to be implemented, but does not yet have a specification sponsor

    Type

    No type

    Projects

    Status

    Spec - Accepted

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions