File tree 3 files changed +3
-5
lines changed
dev-packages/browser-integration-tests/suites/tracing/request/xhr-strip-query-and-fragment
3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ sentryTest(
149
149
const requestSpan = transactionEvent . spans ?. find ( ( { op } ) => op === 'http.client' ) ;
150
150
151
151
expect ( requestSpan ) . toMatchObject ( {
152
- description : 'GET http://sentry-test.io /api/users' ,
152
+ description : 'GET /api/users' ,
153
153
parent_span_id : transactionEvent . contexts ?. trace ?. span_id ,
154
154
span_id : expect . stringMatching ( / [ a - f 0 - 9 ] { 16 } / ) ,
155
155
start_timestamp : expect . any ( Number ) ,
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ export function xhrCallback(
349
349
const fullUrl = getFullURL ( url ) ;
350
350
const parsedUrl = fullUrl ? parseUrl ( fullUrl ) : parseUrl ( url ) ;
351
351
352
- const urlForSpanName = parsedUrl ? getSanitizedUrlString ( parsedUrl ) : stripUrlQueryAndFragment ( url ) ;
352
+ const urlForSpanName = stripUrlQueryAndFragment ( url ) ;
353
353
354
354
const hasParent = ! ! getActiveSpan ( ) ;
355
355
Original file line number Diff line number Diff line change @@ -56,14 +56,12 @@ export function instrumentFetchRequest(
56
56
const fullUrl = getFullURL ( url ) ;
57
57
const parsedUrl = fullUrl ? parseUrl ( fullUrl ) : parseUrl ( url ) ;
58
58
59
- const urlForSpanName = parsedUrl ? getSanitizedUrlString ( parsedUrl ) : stripUrlQueryAndFragment ( url ) ;
60
-
61
59
const hasParent = ! ! getActiveSpan ( ) ;
62
60
63
61
const span =
64
62
shouldCreateSpanResult && hasParent
65
63
? startInactiveSpan ( {
66
- name : `${ method } ${ urlForSpanName } ` ,
64
+ name : `${ method } ${ stripUrlQueryAndFragment ( url ) } ` ,
67
65
attributes : {
68
66
url,
69
67
type : 'fetch' ,
You can’t perform that action at this time.
0 commit comments