firebase / firebase/firebase-js-sdk
Analytics Logs Run with High Priority
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### [REQUIRED] Describe your environment
* Browser version: Chrome 80
* Firebase SDK version: ^7.6.1-0
* Firebase Product: hosting, functions, analytics
### [REQUIRED] Describe the problem
When using `logEvent`, the event logging requests run with `high` priority. Therefore, when I want to make an HTTP request, and also log the user event at the same time, I get this network stack, where my intentional HTTP request has a "waiting" time, probably caused because another `high` priority requests happen at the same time.

This is NOT the case with Google Analytics.
#### Steps to reproduce:
```javascript
logEvent("an event");
setTimeout(() => fetch("my-api-url"), 0); // This happens in the next event loop
```
#### Fix:
Pull request #2635
Contributor guide
Assessment
This issue has not been assessed yet.