Skip to content

[CODE HEALTH] Fix clang-tidy performance enum size warnings#3923

Merged
marcalff merged 4 commits intoopen-telemetry:mainfrom
marcalff:tidy_enum_size
Mar 12, 2026
Merged

[CODE HEALTH] Fix clang-tidy performance enum size warnings#3923
marcalff merged 4 commits intoopen-telemetry:mainfrom
marcalff:tidy_enum_size

Conversation

@marcalff
Copy link
Copy Markdown
Member

@marcalff marcalff commented Mar 11, 2026

Fixes # (issue)

Changes

Please provide a brief description of the changes here.

  • Fix clang-tidy performance-enum-size warnings
  • In the API, make sure to preserve enums as is for ABI_VERSION 1, for binary compatibility
  • Everywhere else, use smaller enums (std::uint8_t) when possible.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@marcalff marcalff marked this pull request as ready for review March 11, 2026 21:13
@marcalff marcalff requested a review from a team as a code owner March 11, 2026 21:13
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.06%. Comparing base (6285a72) to head (cea3061).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3923   +/-   ##
=======================================
  Coverage   90.06%   90.06%           
=======================================
  Files         226      226           
  Lines        7223     7223           
=======================================
  Hits         6505     6505           
  Misses        718      718           
Files with missing lines Coverage Δ
...include/opentelemetry/sdk/common/attribute_utils.h 98.81% <ø> (ø)
...lude/opentelemetry/sdk/common/global_log_handler.h 50.00% <ø> (ø)
...e/opentelemetry/sdk/metrics/export/metric_filter.h 100.00% <ø> (ø)
...opentelemetry/sdk/metrics/export/metric_producer.h 100.00% <ø> (ø)
...dk/include/opentelemetry/sdk/metrics/instruments.h 75.76% <ø> (ø)
sdk/include/opentelemetry/sdk/trace/sampler.h 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcalff marcalff merged commit 7bd5da2 into open-telemetry:main Mar 12, 2026
114 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants