Skip to content

refactor(sdk-logs): remove unnecessary closure in _maybeStartTimer()#6361

Closed
cjihrig wants to merge 2 commits intoopen-telemetry:mainfrom
cjihrig:sdk-logs-closure
Closed

refactor(sdk-logs): remove unnecessary closure in _maybeStartTimer()#6361
cjihrig wants to merge 2 commits intoopen-telemetry:mainfrom
cjihrig:sdk-logs-closure

Conversation

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 1, 2026

Which problem is this PR solving?

_maybeStartTimer() creates an unnecessary closure in order to invoke flush() from a timer. This creates unnecessary overhead at runtime.

Fixes # N/A

Short description of the changes

This commit removes the unnecessary closure.

Type of change

Perf refactor

How Has This Been Tested?

  • Test suite

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@cjihrig cjihrig requested a review from a team as a code owner February 1, 2026 23:19
@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.48%. Comparing base (f15aa7e) to head (6870764).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6361   +/-   ##
=======================================
  Coverage   95.48%   95.48%           
=======================================
  Files         363      363           
  Lines       11564    11564           
  Branches     2669     2669           
=======================================
  Hits        11042    11042           
  Misses        522      522           
Files with missing lines Coverage Δ
...sdk-logs/src/export/BatchLogRecordProcessorBase.ts 92.22% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cjihrig
Copy link
Contributor Author

cjihrig commented Feb 1, 2026

Oh, it looks like this won't be necessary with #6356. I'll close this.

@cjihrig cjihrig closed this Feb 1, 2026
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

Comments