Skip to content

[cmd/mdatagen] Fix: correct acronym handling in FormatIdentifier#15438

Merged
dmitryax merged 3 commits into
open-telemetry:mainfrom
jkoronaAtCisco:id_formatter_fix
Jun 12, 2026
Merged

[cmd/mdatagen] Fix: correct acronym handling in FormatIdentifier#15438
dmitryax merged 3 commits into
open-telemetry:mainfrom
jkoronaAtCisco:id_formatter_fix

Conversation

@jkoronaAtCisco

Copy link
Copy Markdown
Contributor

Description

Fix FormatIdentifier so that a property/attribute/metric name that is exactly a known acronym generates the correct all-caps Go identifier (e.g. id -> ID, url -> URL, http -> HTTP).

Note: any component whose metadata defines a metric, attribute, or event name that is exactly a standalone acronym (e.g. cpu, id, url) will have its generated exported Go identifier renamed on next regeneration — this is a source-breaking change for code that references such a generated constant directly.

Testing

Updated corresponding unit tests.

Authorship

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

@jkoronaAtCisco
jkoronaAtCisco requested review from a team and dmitryax as code owners June 11, 2026 14:29
Add issue tracking for the identifier formatting fix.
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.34%. Comparing base (6950fbf) to head (b3f799e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...mplereceiver/internal/metadata/generated_config.go 50.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15438   +/-   ##
=======================================
  Coverage   91.34%   91.34%           
=======================================
  Files         709      709           
  Lines       46237    46237           
=======================================
  Hits        42236    42236           
  Misses       2788     2788           
  Partials     1213     1213           

☔ 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.

Comment thread .chloggen/id_formatter_fix.yaml Outdated
@dmitryax
dmitryax added this pull request to the merge queue Jun 12, 2026
Merged via the queue into open-telemetry:main with commit bdcc84c Jun 12, 2026
65 of 68 checks passed
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.

2 participants