mirror of
https://github.com/hanzoai/telemetry.git
synced 2026-10-30 20:01:49 +00:00
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]>