File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable max-lines */
22import { getCurrentHub , getDynamicSamplingContextFromClient , hasTracingEnabled } from '@sentry/core' ;
3- import type { SentryWrappedXMLHttpRequest , Span } from '@sentry/types' ;
3+ import type { HandlerDataXhr , SentryWrappedXMLHttpRequest , Span } from '@sentry/types' ;
44import {
55 addFetchInstrumentationHandler ,
66 addXhrInstrumentationHandler ,
@@ -67,23 +67,6 @@ export interface RequestInstrumentationOptions {
6767 shouldCreateSpanForRequest ?( this : void , url : string ) : boolean ;
6868}
6969
70- /** Data returned from XHR request */
71- export interface XHRData {
72- xhr ?: {
73- [ SENTRY_XHR_DATA_KEY ] ?: {
74- method : string ;
75- url : string ;
76- status_code : number ;
77- // eslint-disable-next-line @typescript-eslint/no-explicit-any
78- data : Record < string , any > ;
79- } ;
80- __sentry_xhr_span_id__ ?: string ;
81- setRequestHeader ?: ( key : string , val : string ) => void ;
82- getRequestHeader ?: ( key : string ) => string ;
83- __sentry_own_request__ ?: boolean ;
84- } ;
85- }
86-
8770export const defaultRequestInstrumentationOptions : RequestInstrumentationOptions = {
8871 traceFetch : true ,
8972 traceXHR : true ,
Original file line number Diff line number Diff line change 11/* eslint-disable deprecation/deprecation */
22import * as sentryCore from '@sentry/core' ;
3- import type { HandlerDataFetch , SentryWrappedXMLHttpRequest } from '@sentry/types' ;
3+ import type { HandlerDataFetch , HandlerDataXhr , SentryWrappedXMLHttpRequest } from '@sentry/types' ;
44import * as utils from '@sentry/utils' ;
55import { SENTRY_XHR_DATA_KEY } from '@sentry/utils' ;
66
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface SentryWrappedXMLHttpRequest {
1111 // span id for the xhr request
1212 __sentry_xhr_span_id__ ?: string ;
1313 setRequestHeader ?: ( key : string , val : string ) => void ;
14- getRequestHeader ?: ( key : string ) => string ;
14+ getResponseHeader ?: ( key : string ) => string | null ;
1515}
1616
1717// WARNING: When the shape of this type is changed bump the version in `SentryWrappedXMLHttpRequest`
You can’t perform that action at this time.
0 commit comments