Skip to content

[mdatagen] Consider linking metrics/attributes from metadata.yaml to SemConv definitions #13297

@ChrsMark

Description

@ChrsMark

mdatagen allows today to set sem_conv_version within the metdata.yaml file. However this version is only used to import the semantic conventions module at

rm.SetSchemaUrl(conventions.SchemaURL)

Currently, there is no way for us to know if metrics defined in metadata.yaml follow the Semantic Conventions or not. We should consider linking metrics defined in metadata.yaml to their Semantic Convnetions' definitions, if exist.

This should be similar to how SchemaUrl is defined:

rm.SetSchemaUrl(conventions.SchemaURL)

This will allow us to:

  1. Leverage Semantic Conventions definitions directly where exist
  2. Generated code will use imported conventions' metric names directly
  3. Define per metric/attribute stability level directly from SemConv
  4. Start using stable semantic conventions in components: [receiver/hostmetricsreceiver] semantic conventions transition opentelemetry-collector-contrib#35325
  5. Help with components' stability discussions: Document SemConv compatibility requirements for components stability #11878

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions