opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[cmd/mdatagen] Add entities support to metadata.yaml schema

Open dmitryax opened this issue 1 month ago • 1 comments
trafficstars

Component(s)

cmd/mdatagen

Is your feature request related to a problem? Please describe.

The current resource_attributes section doesn't provide a way to organize resource attributes into logical entities with identifying and description attributes. Supporting entities will enable better organization and semantic meaning for resource attributes, aligning with evolving OpenTelemetry semantic conventions around entities.

Describe the solution you'd like

Introduce support for entities section to metadata.yaml to organize resource attributes into logical entities with identity and description attributes.

entities:
  my.entity:
    id_attributes:
      - my.entity.uid
    description_attributes:
      - my.entity.some_attr

We cannot replace all the files to the new schema in one go. So the mdatagen should keep generating the old API using resource_attributes if entities section isn't set. If the new entities section is defined, the generated code for creating resources and documentation should be changed accordingly.

Follow-up work (not in scope of this issue)

Allow (then enforce) metrics reference particular entities

dmitryax avatar Oct 20 '25 23:10 dmitryax