Skip to content

Commit 059fe5e

Browse files
committed
docs: 📝 Add a comment to explain ordering of plugins
1 parent e736ac6 commit 059fe5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/platforms/browser/lib/browser.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ const BugsnagPerformance = createClient({
5050
backgroundingListener,
5151
performance
5252
),
53+
// ResourceLoadPlugin should always come after FullPageLoad plugin, as it should use that
54+
// span context as the parent of it's spans
55+
new ResourceLoadPlugin(spanFactory, spanContextStorage, window.PerformanceObserver),
5356
new NetworkRequestPlugin(spanFactory, fetchRequestTracker, xhrRequestTracker),
54-
new RouteChangePlugin(spanFactory, window.location),
55-
new ResourceLoadPlugin(spanFactory, spanContextStorage, window.PerformanceObserver)
57+
new RouteChangePlugin(spanFactory, window.location)
5658
],
5759
persistence
5860
})

0 commit comments

Comments
 (0)