Skip to content

Conversation

@utpilla
Copy link
Contributor

@utpilla utpilla commented Dec 27, 2024

We don't have to call Vec::split_off() which causes an allocation.

Changes

  • Reuse the preallocated vec when calling export_with_timeout_sync method

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@utpilla utpilla requested a review from a team as a code owner December 27, 2024 23:51
@utpilla utpilla changed the title Avoid vec allocation during export for BatchLogProcessor Avoid vec allocation during each export for BatchLogProcessor Dec 27, 2024
@codecov
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.8%. Comparing base (f3b5fd3) to head (263abcd).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-sdk/src/logs/log_processor.rs 77.7% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2483   +/-   ##
=====================================
  Coverage   77.8%   77.8%           
=====================================
  Files        123     123           
  Lines      22863   22867    +4     
=====================================
+ Hits       17800   17804    +4     
  Misses      5063    5063           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cijothomas cijothomas merged commit 9a8ad95 into open-telemetry:main Dec 28, 2024
20 of 21 checks passed
adriangb pushed a commit to adriangb/opentelemetry-rust that referenced this pull request Feb 4, 2025
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