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 1
1
/* eslint-disable max-lines */
2
2
import { getCurrentHub , getDynamicSamplingContextFromClient , hasTracingEnabled } from '@sentry/core' ;
3
- import type { SentryWrappedXMLHttpRequest , Span } from '@sentry/types' ;
3
+ import type { HandlerDataXhr , SentryWrappedXMLHttpRequest , Span } from '@sentry/types' ;
4
4
import {
5
5
addFetchInstrumentationHandler ,
6
6
addXhrInstrumentationHandler ,
@@ -67,23 +67,6 @@ export interface RequestInstrumentationOptions {
67
67
shouldCreateSpanForRequest ?( this : void , url : string ) : boolean ;
68
68
}
69
69
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
-
87
70
export const defaultRequestInstrumentationOptions : RequestInstrumentationOptions = {
88
71
traceFetch : true ,
89
72
traceXHR : true ,
Original file line number Diff line number Diff line change 1
1
/* eslint-disable deprecation/deprecation */
2
2
import * as sentryCore from '@sentry/core' ;
3
- import type { HandlerDataFetch , SentryWrappedXMLHttpRequest } from '@sentry/types' ;
3
+ import type { HandlerDataFetch , HandlerDataXhr , SentryWrappedXMLHttpRequest } from '@sentry/types' ;
4
4
import * as utils from '@sentry/utils' ;
5
5
import { SENTRY_XHR_DATA_KEY } from '@sentry/utils' ;
6
6
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ export interface SentryWrappedXMLHttpRequest {
11
11
// span id for the xhr request
12
12
__sentry_xhr_span_id__ ?: string ;
13
13
setRequestHeader ?: ( key : string , val : string ) => void ;
14
- getRequestHeader ?: ( key : string ) => string ;
14
+ getResponseHeader ?: ( key : string ) => string | null ;
15
15
}
16
16
17
17
// 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