-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[xpdata] Add high-level API for managing entities attached to resources #14039
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
Conversation
39ce4db to
eae874d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14039 +/- ##
==========================================
+ Coverage 91.61% 91.64% +0.02%
==========================================
Files 655 658 +3
Lines 42793 42909 +116
==========================================
+ Hits 39205 39322 +117
+ Misses 2765 2764 -1
Partials 823 823 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c30ef53 to
f85193f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
Reading the Entity OTEP, I'm constantly reading the terms "Identifying" and "Descriptive". Would it make sense to keep the same terminology in the API to improve readability? I'm making code suggestions in just two parts of the code, but this would apply to all other appearances of ID and Description.
On the other hand, ID is shorter and easily understandable as well; feel free to ignore if you prefer the current naming.
When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder that associate resources with entity types using the entity refs API. The entities section is backward compatible - existing metadata.yaml files without entities continue to work as before.
This change is fully additive for now. The generated Go API is experimental and will change once open-telemetry#14039 is merged.
When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder that associate resources with entity types using the entity refs API. The entities section is backward compatible - existing metadata.yaml files without entities continue to work as before.
This change is fully additive for now. The generated Go API is experimental and will change once open-telemetry#14039 is merged.
When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder that associate resources with entity types using the entity refs API. The entities section is backward compatible - existing metadata.yaml files without entities continue to work as before.
This change is fully additive for now. The generated Go API is experimental and will change once open-telemetry#14039 is merged.
014d3e9 to
d2c8649
Compare
Introduce `Entity`, `EntitySlice`, and `EntityAttributeMap` types that provide a user-friendly interface for working with resource entities. The new API ensures consistency between entity and resource attributes by sharing the underlying attribute map, and prevents attribute conflicts between entities. This API may eventually replace the generated protobuf-based API for better usability.
d2c8649 to
0ec63be
Compare
When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder that associate resources with entity types using the entity refs API. The entities section is backward compatible - existing metadata.yaml files without entities continue to work as before.
This change is fully additive for now. The generated Go API is experimental and will change once open-telemetry#14039 is merged.
When entities are defined, mdatagen generates `AssociateWith{EntityType}()` methods on ResourceBuilder that associate resources with entity types using the entity refs API. The entities section is backward compatible - existing metadata.yaml files without entities continue to work as before.
This change is fully additive for now. The generated Go API is experimental and will change once open-telemetry#14039 is merged.
Introduce
Entity,EntitySlice, andEntityAttributeMaptypes that provide a user-friendly interface for working with resource entities. The new API ensures consistency between entity and resource attributes by sharing the underlying attribute map, and prevents attribute conflicts between entities. This API should eventually replace the generated protobuf-based API for better usability.Resolves #14042