Skip to content

Define an Entity Merge algorithm (from OTEP #264)#4768

Merged
jsuereth merged 19 commits intoopen-telemetry:mainfrom
jsuereth:wip-entity-merge
Apr 20, 2026
Merged

Define an Entity Merge algorithm (from OTEP #264)#4768
jsuereth merged 19 commits intoopen-telemetry:mainfrom
jsuereth:wip-entity-merge

Conversation

@jsuereth
Copy link
Copy Markdown
Contributor

@jsuereth jsuereth commented Dec 1, 2025

Changes

Adds the merge algorithm specified in OTEP#264 to the Resource + Entity data model specification (both still in development).

This merge algorithm has been used in Entity prototypes for the past year and has not seen any change. It's been adaptable enough to handle several re-architectures of SDKs through prototyping, so we're confident in pushing it forward into the specification.

A few caveats:

  • See the note on Resource DataModel about conflicting merge algorithms. This one currently focused only on merging entities into resource when there is a known set of entities in the existing resource.
  • I've split the merge algorithm into two: The Entity portion about eligibility of merging and descriptive attribute merging, and then the more robust resource section.

Link to prototypes:

@jsuereth jsuereth requested review from a team as code owners December 1, 2025 15:05
@jsuereth jsuereth added spec:resource Related to the specification/resource directory area:data-model For issues related to data model labels Dec 1, 2025
@jsuereth jsuereth moved this to Phase 1: Resource <-> Entity Mapping in Entities: Phase 1 Dec 1, 2025
Comment thread specification/resource/data-model.md
Comment thread specification/resource/data-model.md
Comment thread specification/resource/data-model.md Outdated
Comment thread specification/resource/data-model.md
Comment thread specification/resource/data-model.md Outdated
@github-actions
Copy link
Copy Markdown

This PR was marked stale. It will be closed in 14 days without additional activity.

@github-actions github-actions Bot added the Stale label Dec 30, 2025
@jsuereth jsuereth removed the Stale label Jan 8, 2026
@jsuereth jsuereth moved this from Phase 1: Resource <-> Entity Mapping to In Progress in Entities: Phase 1 Jan 26, 2026
Comment thread specification/entities/data-model.md Outdated
Comment thread specification/entities/data-model.md
Comment thread specification/resource/data-model.md
Comment thread specification/entities/data-model.md Outdated
Copy link
Copy Markdown
Member

@dyladan dyladan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has had a lot of discussion and several implementations with no complaints

Comment thread specification/resource/data-model.md
Comment thread specification/resource/data-model.md Outdated
Comment thread specification/entities/data-model.md Outdated
Comment thread specification/resource/data-model.md
@jsuereth jsuereth enabled auto-merge April 20, 2026 14:13
@jsuereth jsuereth added this pull request to the merge queue Apr 20, 2026
Merged via the queue into open-telemetry:main with commit 5fd6988 Apr 20, 2026
8 of 9 checks passed
@jsuereth jsuereth deleted the wip-entity-merge branch April 20, 2026 15:36
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Entities: Phase 1 Apr 20, 2026
hilmarf pushed a commit to apeirora/opentelemetry-specification that referenced this pull request Apr 22, 2026
…-telemetry#4768)

## Changes

Adds the merge algorithm specified in OTEP#264 to the Resource + Entity
data model specification (both still in development).

This merge algorithm has been used in Entity prototypes for the past
year and has not seen any change. It's been adaptable enough to handle
several re-architectures of SDKs through prototyping, so we're confident
in pushing it forward into the specification.

A few caveats:

- See the note on Resource DataModel about conflicting merge algorithms.
This one currently focused only on merging entities into resource when
there is a known set of entities in the existing resource.
- I've split the merge algorithm into two: The Entity portion about
eligibility of merging and descriptive attribute merging, and then the
more robust resource section.

Link to prototypes:

- Java:
https://github.com/jsuereth/opentelemetry-java/blob/wip-entity-and-providers/sdk/common/src/main/java/io/opentelemetry/sdk/entity/internal/EntityUtil.java#L289
- TypeScript:
open-telemetry/opentelemetry-js#5620

---------

Co-authored-by: Dmitry Anoshin <anoshindx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data-model For issues related to data model spec:resource Related to the specification/resource directory

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants