getsentry / getsentry/sentry-javascript

Improve Redirect detection

オープン
#17,282 コメント 1 件 リアクション 0 件 担当者 1 名 @Lms24 が担当を希望しています GitHub で見る
Browser Improvement State: Needs Discussion
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
515

説明

### Description

Our current redirection detection approach works in some cases but it fails in others, for example in the Sentry frontend (oh the irony 😅)

Some ideas to improve the detector:

* apply it generally to anyone calling `startBrowserTracingNavigationSpan`. Right now, we only apply redirect detection to the default browserTracingIntegration and any derivateives that rely on the default behaviour. Since in Sentry we use the React Router browserTracingIntegration, the logic is not applied.
* Increase time thresholds in general. 300ms is very short, especially for the first pageload
* Reset `lastInteractionTimestamp` when starting a new navigation *root* span. Previous interactions should not matter for subsequent navigations/redirects.
* Add separate time thresholds for
* pageload -> 1st navigation: A pageload likely takes some time for the router to initialize and potentially redirect. 300ms is *very* short here.
* navigation -> navigation: Here the time window likely doesn't need to be too long. 300ms is likely enough.
* For now, we can increase the threshold in general and re-evaluate if we get false positives for the navigation -> navigation case.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。