UNPKG

2.35 kBTypeScriptView Raw
1import type { Attachment } from './attachment';
2import type { Breadcrumb } from './breadcrumb';
3import type { Contexts } from './context';
4import type { DebugMeta } from './debugMeta';
5import type { Exception } from './exception';
6import type { Extras } from './extra';
7import type { Measurements } from './measurement';
8import type { Primitive } from './misc';
9import type { Request } from './request';
10import type { CaptureContext } from './scope';
11import type { SdkInfo } from './sdkinfo';
12import type { Severity, SeverityLevel } from './severity';
13import type { Span } from './span';
14import type { Thread } from './thread';
15import type { TransactionSource } from './transaction';
16import type { User } from './user';
17/** JSDoc */
18export interface Event {
19 event_id?: string;
20 message?: string;
21 timestamp?: number;
22 start_timestamp?: number;
23 level?: Severity | SeverityLevel;
24 platform?: string;
25 logger?: string;
26 server_name?: string;
27 release?: string;
28 dist?: string;
29 environment?: string;
30 sdk?: SdkInfo;
31 request?: Request;
32 transaction?: string;
33 modules?: {
34 [key: string]: string;
35 };
36 fingerprint?: string[];
37 exception?: {
38 values?: Exception[];
39 };
40 breadcrumbs?: Breadcrumb[];
41 contexts?: Contexts;
42 tags?: {
43 [key: string]: Primitive;
44 };
45 extra?: Extras;
46 user?: User;
47 type?: EventType;
48 spans?: Span[];
49 measurements?: Measurements;
50 debug_meta?: DebugMeta;
51 sdkProcessingMetadata?: {
52 [key: string]: any;
53 };
54 transaction_info?: {
55 source: TransactionSource;
56 };
57 threads?: {
58 values: Thread[];
59 };
60}
61/**
62 * The type of an `Event`.
63 * Note that `ErrorEvent`s do not have a type (hence its undefined),
64 * while all other events are required to have one.
65 */
66export declare type EventType = 'transaction' | 'profile' | 'replay_event' | undefined;
67export interface ErrorEvent extends Event {
68 type: undefined;
69}
70export interface TransactionEvent extends Event {
71 type: 'transaction';
72}
73/** JSDoc */
74export interface EventHint {
75 event_id?: string;
76 captureContext?: CaptureContext;
77 syntheticException?: Error | null;
78 originalException?: unknown;
79 attachments?: Attachment[];
80 data?: any;
81 integrations?: string[];
82}
83//# sourceMappingURL=event.d.ts.map
\No newline at end of file