opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

use sendBeacon for exporting when page is hidden

Open scheler opened this issue 1 year ago • 1 comments
trafficstars

Which problem is this PR solving?

Currently, the option to use xhr vs sendBeacon is left to the app developer when setting up the sdk. However, when a page is hidden we must use sendBeacon or otherwise risk losing the data. This PR makes this change, while still giving an option to the app developer to override and use xhr all the time.

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

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

scheler avatar Apr 09 '24 17:04 scheler

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Jun 17 '24 06:06 github-actions[bot]

This PR was closed because it has been stale for 14 days with no activity.

github-actions[bot] avatar Jul 08 '24 06:07 github-actions[bot]