Skip to content

refactor(core): remove unnecessary closure in _export()#6360

Merged
david-luna merged 2 commits intoopen-telemetry:mainfrom
cjihrig:core-closure
Feb 4, 2026
Merged

refactor(core): remove unnecessary closure in _export()#6360
david-luna merged 2 commits intoopen-telemetry:mainfrom
cjihrig:core-closure

Conversation

@cjihrig
Copy link
Copy Markdown
Contributor

@cjihrig cjihrig commented Feb 1, 2026

Which problem is this PR solving?

_export() creates an unnecessary closure in order to pass the result of export() to its own resolve() function. 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 22:37
Comment thread CHANGELOG.md Outdated
@codecov
Copy link
Copy Markdown

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 (4bda627).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6360      +/-   ##
==========================================
- Coverage   95.48%   95.48%   -0.01%     
==========================================
  Files         363      363              
  Lines       11564    11563       -1     
  Branches     2669     2669              
==========================================
- Hits        11042    11041       -1     
  Misses        522      522              
Files with missing lines Coverage Δ
...ckages/opentelemetry-core/src/internal/exporter.ts 100.00% <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.

@david-luna david-luna added this pull request to the merge queue Feb 4, 2026
Merged via the queue into open-telemetry:main with commit 885fb67 Feb 4, 2026
27 checks passed
@otelbot
Copy link
Copy Markdown
Contributor

otelbot Bot commented Feb 4, 2026

Thank you for your contribution @cjihrig! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

@cjihrig cjihrig deleted the core-closure branch February 4, 2026 15:25
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.

2 participants