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

fix(sdk-trace-base): pass BatchSpanProcessor#forceFlush() errors on visibilitychange/pagehide to globalErrorHandler #5143

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

BatchSpanProcessor#forceFlush() can reject, but errors should be passed to the globalErrorHandler() instead of remaining unhandled.

Fixes #5133

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Added unit test

…isibilitychange/pagehide to globalErrorHandler
@pichlermarc pichlermarc added priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies, etc pkg:sdk-trace-base bug Something isn't working labels Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.17%. Comparing base (db14633) to head (b475cbe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5143      +/-   ##
==========================================
- Coverage   93.18%   93.17%   -0.02%     
==========================================
  Files         314      314              
  Lines        8076     8076              
  Branches     1622     1622              
==========================================
- Hits         7526     7525       -1     
- Misses        550      551       +1     

see 1 file with indirect coverage changes

@pichlermarc pichlermarc marked this pull request as ready for review November 12, 2024 16:31
@pichlermarc pichlermarc requested a review from a team as a code owner November 12, 2024 16:31
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Hector Hernandez <39923391+hectorhdzg@users.noreply.github.com>
@pichlermarc pichlermarc added this pull request to the merge queue Nov 14, 2024
Merged via the queue into open-telemetry:main with commit 4afc190 Nov 14, 2024
19 checks passed
@pichlermarc pichlermarc deleted the fix/bsp-pagehide-visibilitychange-forceflush branch November 14, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:sdk-trace-base priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser BatchSpanProcessor forceFlush not handling errors: "XHR request failed with non-retryable status"
2 participants