Skip to content

Enhance validation of metadata.yaml #23424

@mackjmr

Description

@mackjmr

Component(s)

cmd/mdatagen

Describe the issue you're reporting

Currently, some validation already exists here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/mdatagen/loader.go#L238-L290.

However, the validation done does not cover all cases. For instance, it is not checked whether class is one of the supported values (e.g. one of receiver|processor|exporter|connector|extension for class) -- it is only checked that this is not empty.

This is to add validation so that:

  • We check that all required fields are present.
  • We check that all values match the supported values.

This is the first step in order to add a CI test.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions