-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathhawk-initial-settings.ts
More file actions
90 lines (76 loc) · 1.97 KB
/
hawk-initial-settings.ts
File metadata and controls
90 lines (76 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import type { EventContext, AffectedUser } from '@hawk.so/types';
import type { HawkJavaScriptEvent } from './event';
/**
* JS Catcher initial settings
*/
export interface HawkInitialSettings {
/**
* User project's Integration Token
*/
token: string;
/**
* Enable debug mode
* Send raw event's data additionally in addons field by key 'RAW_EVENT_DATA'
*/
debug?: boolean;
/**
* Current release and bundle version
*/
release?: string;
/**
* Current user information
*/
user?: AffectedUser;
/**
* Any additional data you want to send with every event
*/
context?: EventContext;
/**
* How many time we should try to reconnect when connection lost.
*/
reconnectionAttempts?: number;
/**
* How many time we should wait between reconnection attempts.
*/
reconnectionTimeout?: number;
/**
* Hawk Collector endpoint.
* Can be overwritten for development purposes.
*
* @example ws://localhost:3000/ws
*/
collectorEndpoint?: string;
/**
* Instance of a vue application
* to handle its errors
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
vue?: any;
/**
* Do not initialize global errors handling
* This options still allow you send events manually
*/
disableGlobalErrorsHandling?: boolean;
/**
* This Method allows you to filter any data you don't want sending to Hawk.
*
* Return `false` to prevent the event from being sent to Hawk.
*/
beforeSend?(event: HawkJavaScriptEvent): HawkJavaScriptEvent | false;
/**
* Disable Vue.js error handler
*
* Used by @hawk.so/nuxt since Nuxt has own error hook.
*/
disableVueErrorHandler?: boolean;
/**
* Console log handler
*/
consoleTracking?: boolean;
/**
* Track only errors from files marked with HAWK:tracked marker.
* If enabled, only errors from files containing this marker will be sent.
* Default is false (all errors are tracked).
*/
trackOnlyMarkedFiles?: boolean;
}