UNPKG

1.83 kBTypeScriptView Raw
1import type { WebFetchHeaders } from './webfetchapi';
2type XHRSendInput = unknown;
3export type ConsoleLevel = 'debug' | 'info' | 'warn' | 'error' | 'log' | 'assert' | 'trace';
4export interface SentryWrappedXMLHttpRequest {
5 __sentry_xhr_v3__?: SentryXhrData;
6 __sentry_own_request__?: boolean;
7 __sentry_xhr_span_id__?: string;
8 setRequestHeader?: (key: string, val: string) => void;
9 getResponseHeader?: (key: string) => string | null;
10}
11export interface SentryXhrData {
12 method: string;
13 url: string;
14 status_code?: number;
15 body?: XHRSendInput;
16 request_body_size?: number;
17 response_body_size?: number;
18 request_headers: Record<string, string>;
19}
20export interface HandlerDataXhr {
21 xhr: SentryWrappedXMLHttpRequest;
22 startTimestamp?: number;
23 endTimestamp?: number;
24}
25interface SentryFetchData {
26 method: string;
27 url: string;
28 request_body_size?: number;
29 response_body_size?: number;
30 __span?: string;
31}
32export interface HandlerDataFetch {
33 args: any[];
34 fetchData: SentryFetchData;
35 startTimestamp: number;
36 endTimestamp?: number;
37 response?: {
38 readonly ok: boolean;
39 readonly status: number;
40 readonly url: string;
41 headers: WebFetchHeaders;
42 };
43 error?: unknown;
44}
45export interface HandlerDataDom {
46 event: object | {
47 target: object;
48 };
49 name: string;
50 global?: boolean;
51}
52export interface HandlerDataConsole {
53 level: ConsoleLevel;
54 args: any[];
55}
56export interface HandlerDataHistory {
57 from: string | undefined;
58 to: string;
59}
60export interface HandlerDataError {
61 column?: number;
62 error?: Error;
63 line?: number;
64 msg: string | object;
65 url?: string;
66}
67export type HandlerDataUnhandledRejection = unknown;
68export {};
69//# sourceMappingURL=instrument.d.ts.map
\No newline at end of file