Skip to content

Commit 5b74d49

Browse files
committed
feat(solidjs): Drop custom pageload navigation in favor of browserTracingIntegration's
1 parent c326cec commit 5b74d49

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

packages/solidjs/src/solidrouter.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import {
2-
WINDOW,
32
browserTracingIntegration,
43
getActiveSpan,
54
getRootSpan,
65
spanToJSON,
76
startBrowserTracingNavigationSpan,
8-
startBrowserTracingPageLoadSpan,
97
} from '@sentry/browser';
108
import {
119
SEMANTIC_ATTRIBUTE_SENTRY_OP,
@@ -136,11 +134,10 @@ export function solidRouterBrowserTracingIntegration(
136134
): Integration {
137135
const integration = browserTracingIntegration({
138136
...options,
139-
instrumentPageLoad: false,
140137
instrumentNavigation: false,
141138
});
142139

143-
const { instrumentPageLoad = true, instrumentNavigation = true, useBeforeLeave, useLocation } = options;
140+
const { instrumentNavigation = true, useBeforeLeave, useLocation } = options;
144141

145142
return {
146143
...integration,
@@ -151,18 +148,6 @@ export function solidRouterBrowserTracingIntegration(
151148
afterAllSetup(client) {
152149
integration.afterAllSetup(client);
153150

154-
const initPathName = WINDOW && WINDOW.location && WINDOW.location.pathname;
155-
if (instrumentPageLoad && initPathName) {
156-
startBrowserTracingPageLoadSpan(client, {
157-
name: initPathName,
158-
attributes: {
159-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
160-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
161-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.solidjs.solidrouter',
162-
},
163-
});
164-
}
165-
166151
if (instrumentNavigation) {
167152
CLIENTS_WITH_INSTRUMENT_NAVIGATION.add(client);
168153
}

0 commit comments

Comments
 (0)