-
Notifications
You must be signed in to change notification settings - Fork 501
[SDK] View should not have a unit #3552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3552 +/- ##
==========================================
- Coverage 90.03% 90.02% -0.01%
==========================================
Files 220 220
Lines 7069 7069
==========================================
- Hits 6364 6363 -1
- Misses 705 706 +1
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the unit
parameter from the View class and ViewFactory methods to address issue #3547. This is a breaking change that simplifies the View interface by eliminating the unit field that was apparently not needed.
- Removed the
unit
member variable from the View class - Removed the
unit
parameter from all ViewFactory::Create() method overloads - Updated all test files and examples to use the new API without unit parameters
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/include/opentelemetry/sdk/metrics/view/view.h | Removed unit member variable and constructor parameter from View class |
sdk/include/opentelemetry/sdk/metrics/view/view_factory.h | Removed unit parameter from ViewFactory::Create method signatures |
sdk/src/metrics/view/view_factory.cc | Updated ViewFactory::Create implementations to remove unit parameter handling |
sdk/test/metrics/sum_aggregation_test.cc | Updated test cases to use new View constructor without unit parameter |
sdk/test/metrics/meter_test.cc | Updated test case to use new View constructor without unit parameter |
sdk/test/metrics/histogram_test.cc | Updated test cases to use new View constructor without unit parameter |
sdk/test/metrics/histogram_aggregation_test.cc | Updated test case to use new View constructor without unit parameter |
sdk/test/metrics/histogram_aggregation_benchmark.cc | Updated benchmark to use new View constructor without unit parameter |
examples/prometheus/main.cc | Updated example to use new ViewFactory::Create without unit parameter |
examples/otlp/grpc_metric_main.cc | Updated example to use new ViewFactory::Create without unit parameter |
examples/metrics_simple/metrics_ostream.cc | Updated example to use new ViewFactory::Create without unit parameter |
CHANGELOG.md | Added entry documenting the breaking change |
There was a problem hiding this comment.
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.
[SDK] View should not have a unit (open-telemetry#3552)
Fixes #3547
Changes
Please provide a brief description of the changes here.
unit
member from classView
unit
parameter fromViewFactory::Create()
methodsFor significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes