Skip to content
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

Optimize Metric Processing for Single Collector with Delta Temporality #3236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Jan 9, 2025

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
  • Unit tests have been added
  • Changes in public API reviewed

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for opentelemetry-cpp-api-docs ready!

Name Link
🔨 Latest commit 983162b
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/677fd767fff65700083906ab
😎 Deploy Preview https://deploy-preview-3236--opentelemetry-cpp-api-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lalitb lalitb changed the title delta temporality optimization in case single collector is configured Metric collection optimization for delta temporality when one collector is configured. Jan 9, 2025
@lalitb lalitb changed the title Metric collection optimization for delta temporality when one collector is configured. Optimization of metric collection for delta temporality with a single configured collector. Jan 9, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.18%. Comparing base (d19eb32) to head (983162b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3236      +/-   ##
==========================================
+ Coverage   88.16%   88.18%   +0.02%     
==========================================
  Files         198      198              
  Lines        6224     6241      +17     
==========================================
+ Hits         5487     5503      +16     
- Misses        737      738       +1     
Files with missing lines Coverage Δ
sdk/src/metrics/state/temporal_metric_storage.cc 97.41% <100.00%> (-0.93%) ⬇️

@lalitb lalitb changed the title Optimization of metric collection for delta temporality with a single configured collector. Optimization of metric collection for delta temporality with a single configured reader. Jan 9, 2025
@lalitb lalitb changed the title Optimization of metric collection for delta temporality with a single configured reader. Optimize Metric Processing for Single Collector with Delta Temporality Jan 9, 2025
@lalitb lalitb marked this pull request as ready for review January 9, 2025 16:56
@lalitb lalitb requested a review from a team as a code owner January 9, 2025 16:56
@lalitb lalitb requested a review from ThomsonTan January 9, 2025 16:56
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.

1 participant