-
Notifications
You must be signed in to change notification settings - Fork 449
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
[SDK] Optimize Metric Processing for Single Collector with Delta Temporality #3236
[SDK] Optimize Metric Processing for Single Collector with Delta Temporality #3236
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3236 +/- ##
==========================================
+ Coverage 87.78% 87.80% +0.02%
==========================================
Files 198 198
Lines 6308 6324 +16
==========================================
+ Hits 5537 5552 +15
- Misses 771 772 +1
|
if (collectors.size() == 1 && collector->GetAggregationTemporality( | ||
instrument_descriptor_.type_) == AggregationTemporality::kDelta) |
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.
Nit: use the aggregation_temporarily
local variable, from the previous line, in the if test.
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.
Thanks done.
This introduces a fast path for cases with a single collector/reader using delta temporality. It skips unnecessary intermediate processing and directly generates metrics for callback, reducing memory usage and CPU overhead. This change is supposed to improve performance for common single-collector scenarios while retaining existing functionality for other cases.
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes