Skip to content

[SDK] Move predicate_factory code from header file (#1429) - #4688

Merged
marcalff merged 7 commits into
open-telemetry:mainfrom
mawasak:1429_header_to_cc_file
Oct 11, 2026
Merged

marcalff merged 7 commits into
open-telemetry:mainfrom
mawasak:1429_header_to_cc_file

Conversation

@mawasak

@mawasak mawasak commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Contributes to #1429

Changes

Moving code from header file to cc file according to #1429.

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

@mawasak
mawasak requested a review from a team as a code owner October 9, 2026 22:09
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: mawasak / name: MariuszW (c0abdc0)

@marcalff marcalff added the pr:waiting-on-cla Waiting on CLA label Oct 10, 2026
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.77%. Comparing base (cdb5e44) to head (16f09b1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sdk/src/metrics/view/predicate_factory.cc 90.91% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4688      +/-   ##
==========================================
- Coverage   86.77%   86.77%   -0.00%     
==========================================
  Files         525      525              
  Lines       20747    20742       -5     
==========================================
- Hits        18002    17997       -5     
  Misses       2745     2745              
Files with missing lines Coverage Δ
sdk/src/metrics/view/predicate_factory.cc 90.91% <90.91%> (ø)

... and 1 file with indirect coverage changes

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

@marcalff marcalff removed the pr:waiting-on-cla Waiting on CLA label Oct 10, 2026
@marcalff

Copy link
Copy Markdown
Member

@mawasak

Thanks for the contribution.

Please fix format errors in CI, patch below:

diff --git a/sdk/src/metrics/view/predicate_factory.cc b/sdk/src/metrics/view/predicate_factory.cc
index eaf931c..68e26d0 100644
--- a/sdk/src/metrics/view/predicate_factory.cc
+++ b/sdk/src/metrics/view/predicate_factory.cc
@@ -11,7 +11,7 @@ namespace sdk
 namespace metrics
 {
 std::unique_ptr<Predicate> PredicateFactory::GetPredicate(opentelemetry::nostd::string_view pattern,
-                                                 PredicateType type)
+                                                          PredicateType type)
 {
   if (((type == PredicateType::kPattern || type == PredicateType::kWildcard) && pattern == "*") ||
       (type == PredicateType::kExact && pattern == ""))
@@ -32,6 +32,6 @@ std::unique_ptr<Predicate> PredicateFactory::GetPredicate(opentelemetry::nostd::
   }
   return std::unique_ptr<Predicate>(new MatchNothingPattern());
 }
-}
-}
+}  // namespace metrics
+}  // namespace sdk
 OPENTELEMETRY_END_NAMESPACE

Ok to merge after that.

@mawasak

mawasak commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi, format error fixed. Thanks

@dbarker dbarker changed the title Moving code from header file (#1429) [SDK] Move predicate_factory code from header file (#1429) Oct 10, 2026

@marcalff marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup.

@mawasak

mawasak commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

Some iwyu errors yet:-/

Comment thread sdk/src/metrics/view/predicate_factory.cc
@marcalff
marcalff merged commit a3186da into open-telemetry:main Oct 11, 2026
75 checks passed
@mawasak

mawasak commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for merging.

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.

3 participants