Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Avoid performance.timeOrigin if too skewed (#3356)
Try to use the best of performance.timeOrigin or performance.timing.navigationStart as long as they are near the current time reported by Date.now. The intention is to mitigate transactions that are reported with a huge time skew, particularly from Firefox. This is trying to address the inconsistencies between browsers by always trying to use timeOrigin first, as long as its consistent with the current time, otherwise, use the navigationStart if its consistent with the current time, eventually fallback to date if all else fails. We also remember what source is used for the time origin, so we can tag events and analyze later. Co-authored-by: Rodolfo Carvalho <rodolfo.carvalho@sentry.io> Co-authored-by: Alberto Leal <mail4alberto@gmail.com>
- Loading branch information