Files
4dafea21d1 cmd/mdatagen: introduce additional metadata for deprecated metrics (#14408)
This PR fixes how `mdatagen` handles deprecated metric fields in
`metadata.yaml`.

The metadata loader now aligns correctly with the schema and test
expectations,
ensuring deprecated fields are only set when explicitly defined.

## What was changed?

- Updated metadata loading logic to correctly handle deprecated metric
fields
- Ensured deprecated fields are only set when explicitly specified
- Aligned generated metadata with existing test expectations
- All existing and sample `mdatagen` tests pass after this change

---

## Testing

- `go test ./cmd/mdatagen/...`
- Verified all sample metadata generators and internal tests pass
- All `mdatagen` tests pass.

---

*Related:*
https://github.com/open-telemetry/opentelemetry-collector/issues/14113

N/A (internal correctness and test alignment fix)

---------

Co-authored-by: Damien Mathieu <[email protected]>
2026-02-22 00:54:49 -08:00
..