Skip to content

[bug][cmd/mdatagen] mdatagen fix versioned metric collision logic#15649

Open
osullivandonal wants to merge 2 commits into
open-telemetry:mainfrom
osullivandonal:mdatagen-fix-versioned-metric-different-names
Open

[bug][cmd/mdatagen] mdatagen fix versioned metric collision logic#15649
osullivandonal wants to merge 2 commits into
open-telemetry:mainfrom
osullivandonal:mdatagen-fix-versioned-metric-different-names

Conversation

@osullivandonal

@osullivandonal osullivandonal commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Fix incorrect collision warning logged for versioned metrics with different names. Previously, the same-name collision detection (type/attribute check) ran unconditionally for all migrations, causing warnings and incorrectly disabling legacy metrics when legacy and v1 had different names. Test coverage was also added here for this issue.

Link to tracking issue

Fixes #15648

Testing

metrics_test.go.tmpl was updated with a test that is generated for versioned metrics where legacy and v1 have different names. This tests that no warning log msg is recorded.

Authorship

  • I, a human, wrote this pull request description myself.

Fix incorrect collision warning logged for versioned metrics with
different names. Previously, the same-name collision detection
(type/attribute check) ran unconditionally for all migrations, causing
warnings and incorrectly disabling legacy metrics when legacy and v1 had
different names. Test coverage was also added here for this issue.
@osullivandonal
osullivandonal requested review from a team and dmitryax as code owners July 24, 2026 11:10
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.05%. Comparing base (52e6bf4) to head (8504a13).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15649      +/-   ##
==========================================
+ Coverage   91.03%   91.05%   +0.01%     
==========================================
  Files         729      729              
  Lines       48491    48477      -14     
==========================================
- Hits        44144    44140       -4     
+ Misses       3020     3013       -7     
+ Partials     1327     1324       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mdatagen] Versioned metrics with different names incorrectly trigger same-name collision logic

1 participant