Skip to content

Conversation

@cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Dec 23, 2025

Which problem is this PR solving?

isExportHTTPErrorRetryable() currently creates a throwaway array (more garbage for the garbage collector) and iterates over it. The number of cases is very small, so this function can be simplified to a single if statement.

Fixes # N/A

Short description of the changes

This commit simplifies isExportHTTPErrorRetryable() to an if statement.

Type of change

None of these.

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 December 23, 2025 00:16
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.39%. Comparing base (6a64439) to head (ec76320).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6249   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files         314      314           
  Lines        9513     9516    +3     
  Branches     2194     2198    +4     
=======================================
+ Hits         9075     9078    +3     
  Misses        438      438           
Files with missing lines Coverage Δ
...ages/otlp-exporter-base/src/is-export-retryable.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 Dec 23, 2025
Merged via the queue into open-telemetry:main with commit 9a55716 Dec 23, 2025
27 checks passed
@otelbot
Copy link
Contributor

otelbot bot commented Dec 23, 2025

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 retryable branch December 23, 2025 12:58
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