44 addXhrInstrumentationHandler ,
55} from '@sentry-internal/browser-utils' ;
66import {
7+ SEMANTIC_ATTRIBUTE_SENTRY_OP ,
78 SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
89 SentryNonRecordingSpan ,
910 getActiveSpan ,
@@ -26,6 +27,7 @@ import {
2627 browserPerformanceTimeOrigin ,
2728 dynamicSamplingContextToSentryBaggageHeader ,
2829 generateSentryTraceHeader ,
30+ parseUrl ,
2931 stringMatchesSomePattern ,
3032} from '@sentry/utils' ;
3133import { WINDOW } from '../helpers' ;
@@ -310,6 +312,8 @@ export function xhrCallback(
310312
311313 const hasParent = ! ! getActiveSpan ( ) ;
312314
315+ const parsedUrl = parseUrl ( sentryXhrData . url ) ;
316+
313317 const span =
314318 shouldCreateSpanResult && hasParent
315319 ? startInactiveSpan ( {
@@ -318,9 +322,10 @@ export function xhrCallback(
318322 type : 'xhr' ,
319323 'http.method' : sentryXhrData . method ,
320324 url : sentryXhrData . url ,
325+ 'server.address' : parsedUrl . host ,
321326 [ SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ] : 'auto.http.browser' ,
327+ [ SEMANTIC_ATTRIBUTE_SENTRY_OP ] : 'http.client' ,
322328 } ,
323- op : 'http.client' ,
324329 } )
325330 : new SentryNonRecordingSpan ( ) ;
326331
0 commit comments