opentelemetry-collector
opentelemetry-collector copied to clipboard
[cmd/mdatagen] Add basic support for entities to metadata.yaml schema
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 and conditionally executed only if metadata.yaml has entities defined.
The generated Go API is experimental and will change to entities builder. However, for now, it allows introducing concept of entities in mdatagen and emit entities attached to the resource.
The new metadata.yaml syntax for defining entities adopts Weaver v2
Updates https://github.com/open-telemetry/opentelemetry-collector/issues/14051