Skip to content

Commit 3f07f3c

Browse files
committed
fixes
1 parent 6b2f328 commit 3f07f3c

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

packages/tracing-internal/src/browser/request.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable max-lines */
22
import { getCurrentHub, getDynamicSamplingContextFromClient, hasTracingEnabled } from '@sentry/core';
3-
import type { SentryWrappedXMLHttpRequest, Span } from '@sentry/types';
3+
import type { HandlerDataXhr, SentryWrappedXMLHttpRequest, Span } from '@sentry/types';
44
import {
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-
8770
export const defaultRequestInstrumentationOptions: RequestInstrumentationOptions = {
8871
traceFetch: true,
8972
traceXHR: true,

packages/tracing-internal/test/browser/request.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable deprecation/deprecation */
22
import * as sentryCore from '@sentry/core';
3-
import type { HandlerDataFetch, SentryWrappedXMLHttpRequest } from '@sentry/types';
3+
import type { HandlerDataFetch, HandlerDataXhr, SentryWrappedXMLHttpRequest } from '@sentry/types';
44
import * as utils from '@sentry/utils';
55
import { SENTRY_XHR_DATA_KEY } from '@sentry/utils';
66

packages/types/src/instrument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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`

0 commit comments

Comments
 (0)