Skip to content

[mdatagen] validateAttributes func should alos consider check attributes used in telemetry section #10925

@Frapschen

Description

@Frapschen

Describe the bug

The below metadata.yaml will encounter an error unused attributes: [unused_attr used_attr]:

type: metricreceiver

sem_conv_version: 1.9.0

status:
  class: receiver
  stability:
    development: [logs]
    beta: [traces]
    stable: [metrics]

attributes:
  used_attr:
    description: Used attribute.
    type: string

  unused_attr:
    name_override: state
    description: Unused attribute.
    type: string

telemetry:
  metrics:
    test:
      enabled: true
      description: Metric.
      unit: "1"
      gauge:
        value_type: double
      attributes: [used_attr]

I believe the used_attr is already used in the telemetry section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions