@sentry/types 8.31.0 → 8.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/types/checkin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TraceContext } from './context';
|
|
2
2
|
interface CrontabSchedule {
|
|
3
3
|
type: 'crontab';
|
|
4
|
+
/** The crontab schedule string, e.g. 0 * * * *. */
|
|
4
5
|
value: string;
|
|
5
6
|
}
|
|
6
7
|
interface IntervalSchedule {
|
|
@@ -10,18 +11,36 @@ interface IntervalSchedule {
|
|
|
10
11
|
}
|
|
11
12
|
type MonitorSchedule = CrontabSchedule | IntervalSchedule;
|
|
12
13
|
export interface SerializedCheckIn {
|
|
14
|
+
/** Check-In ID (unique and client generated). */
|
|
13
15
|
check_in_id: string;
|
|
16
|
+
/** The distinct slug of the monitor. */
|
|
14
17
|
monitor_slug: string;
|
|
18
|
+
/** The status of the check-in. */
|
|
15
19
|
status: 'in_progress' | 'ok' | 'error';
|
|
20
|
+
/** The duration of the check-in in seconds. Will only take effect if the status is ok or error. */
|
|
16
21
|
duration?: number;
|
|
17
22
|
release?: string;
|
|
18
23
|
environment?: string;
|
|
19
24
|
monitor_config?: {
|
|
20
25
|
schedule: MonitorSchedule;
|
|
26
|
+
/**
|
|
27
|
+
* The allowed allowed margin of minutes after the expected check-in time that
|
|
28
|
+
* the monitor will not be considered missed for.
|
|
29
|
+
*/
|
|
21
30
|
checkin_margin?: number;
|
|
31
|
+
/**
|
|
32
|
+
* The allowed allowed duration in minutes that the monitor may be `in_progress`
|
|
33
|
+
* for before being considered failed due to timeout.
|
|
34
|
+
*/
|
|
22
35
|
max_runtime?: number;
|
|
36
|
+
/**
|
|
37
|
+
* A tz database string representing the timezone which the monitor's execution schedule is in.
|
|
38
|
+
* See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
39
|
+
*/
|
|
23
40
|
timezone?: string;
|
|
41
|
+
/** How many consecutive failed check-ins it takes to create an issue. */
|
|
24
42
|
failure_issue_threshold?: number;
|
|
43
|
+
/** How many consecutive OK check-ins it takes to resolve an issue. */
|
|
25
44
|
recovery_threshold?: number;
|
|
26
45
|
};
|
|
27
46
|
contexts?: {
|
|
@@ -29,27 +48,52 @@ export interface SerializedCheckIn {
|
|
|
29
48
|
};
|
|
30
49
|
}
|
|
31
50
|
export interface HeartbeatCheckIn {
|
|
51
|
+
/** The distinct slug of the monitor. */
|
|
32
52
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
53
|
+
/** The status of the check-in. */
|
|
33
54
|
status: 'ok' | 'error';
|
|
34
55
|
}
|
|
35
56
|
export interface InProgressCheckIn {
|
|
57
|
+
/** The distinct slug of the monitor. */
|
|
36
58
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
59
|
+
/** The status of the check-in. */
|
|
37
60
|
status: 'in_progress';
|
|
38
61
|
}
|
|
39
62
|
export interface FinishedCheckIn {
|
|
63
|
+
/** The distinct slug of the monitor. */
|
|
40
64
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
65
|
+
/** The status of the check-in. */
|
|
41
66
|
status: 'ok' | 'error';
|
|
67
|
+
/** Check-In ID (unique and client generated). */
|
|
42
68
|
checkInId: SerializedCheckIn['check_in_id'];
|
|
69
|
+
/** The duration of the check-in in seconds. Will only take effect if the status is ok or error. */
|
|
43
70
|
duration?: SerializedCheckIn['duration'];
|
|
44
71
|
}
|
|
45
72
|
export type CheckIn = HeartbeatCheckIn | InProgressCheckIn | FinishedCheckIn;
|
|
46
73
|
type SerializedMonitorConfig = NonNullable<SerializedCheckIn['monitor_config']>;
|
|
47
74
|
export interface MonitorConfig {
|
|
75
|
+
/**
|
|
76
|
+
* The schedule on which the monitor should run. Either a crontab schedule string or an interval.
|
|
77
|
+
*/
|
|
48
78
|
schedule: MonitorSchedule;
|
|
79
|
+
/**
|
|
80
|
+
* The allowed allowed margin of minutes after the expected check-in time that
|
|
81
|
+
* the monitor will not be considered missed for.
|
|
82
|
+
*/
|
|
49
83
|
checkinMargin?: SerializedMonitorConfig['checkin_margin'];
|
|
84
|
+
/**
|
|
85
|
+
* The allowed allowed duration in minutes that the monitor may be `in_progress`
|
|
86
|
+
* for before being considered failed due to timeout.
|
|
87
|
+
*/
|
|
50
88
|
maxRuntime?: SerializedMonitorConfig['max_runtime'];
|
|
89
|
+
/**
|
|
90
|
+
* A tz database string representing the timezone which the monitor's execution schedule is in.
|
|
91
|
+
* See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
92
|
+
*/
|
|
51
93
|
timezone?: SerializedMonitorConfig['timezone'];
|
|
94
|
+
/** How many consecutive failed check-ins it takes to create an issue. */
|
|
52
95
|
failureIssueThreshold?: SerializedMonitorConfig['failure_issue_threshold'];
|
|
96
|
+
/** How many consecutive OK check-ins it takes to resolve an issue. */
|
|
53
97
|
recoveryThreshold?: SerializedMonitorConfig['recovery_threshold'];
|
|
54
98
|
}
|
|
55
99
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkin.d.ts","sourceRoot":"","sources":["../../src/checkin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,UAAU,eAAe;IACvB,IAAI,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"checkin.d.ts","sourceRoot":"","sources":["../../src/checkin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,UAAU,eAAe;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;CAC7D;A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,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC5C,mGAAmG;IACnG,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C;AAED,MAAM,MAAM,OAAO,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE7E,KAAK,uBAAuB,GAAG,WAAW,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;IAC1D;;;OAGG;IACH,UAAU,CAAC,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACpD;;;OAGG;IACH,QAAQ,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAC;IAC/C,yEAAyE;IACzE,qBAAqB,CAAC,EAAE,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;IAC3E,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;CACnE"}
|
package/build/types/scope.d.ts
CHANGED
|
@@ -170,8 +170,8 @@ export interface Scope {
|
|
|
170
170
|
/** Clears the current scope and resets its properties. */
|
|
171
171
|
clear(): this;
|
|
172
172
|
/**
|
|
173
|
-
*
|
|
174
|
-
* @param
|
|
173
|
+
* Adds a breadcrumb to the scope
|
|
174
|
+
* @param breadcrumb Breadcrumb
|
|
175
175
|
* @param maxBreadcrumbs number of max breadcrumbs to merged into event.
|
|
176
176
|
*/
|
|
177
177
|
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
|
|
@@ -180,7 +180,7 @@ export interface Scope {
|
|
|
180
180
|
*/
|
|
181
181
|
getLastBreadcrumb(): Breadcrumb | undefined;
|
|
182
182
|
/**
|
|
183
|
-
* Clears all
|
|
183
|
+
* Clears all breadcrumbs from the scope.
|
|
184
184
|
*/
|
|
185
185
|
clearBreadcrumbs(): this;
|
|
186
186
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TraceContext } from './context';
|
|
2
2
|
interface CrontabSchedule {
|
|
3
3
|
type: 'crontab';
|
|
4
|
+
/** The crontab schedule string, e.g. 0 * * * *. */
|
|
4
5
|
value: string;
|
|
5
6
|
}
|
|
6
7
|
interface IntervalSchedule {
|
|
@@ -10,18 +11,36 @@ interface IntervalSchedule {
|
|
|
10
11
|
}
|
|
11
12
|
type MonitorSchedule = CrontabSchedule | IntervalSchedule;
|
|
12
13
|
export interface SerializedCheckIn {
|
|
14
|
+
/** Check-In ID (unique and client generated). */
|
|
13
15
|
check_in_id: string;
|
|
16
|
+
/** The distinct slug of the monitor. */
|
|
14
17
|
monitor_slug: string;
|
|
18
|
+
/** The status of the check-in. */
|
|
15
19
|
status: 'in_progress' | 'ok' | 'error';
|
|
20
|
+
/** The duration of the check-in in seconds. Will only take effect if the status is ok or error. */
|
|
16
21
|
duration?: number;
|
|
17
22
|
release?: string;
|
|
18
23
|
environment?: string;
|
|
19
24
|
monitor_config?: {
|
|
20
25
|
schedule: MonitorSchedule;
|
|
26
|
+
/**
|
|
27
|
+
* The allowed allowed margin of minutes after the expected check-in time that
|
|
28
|
+
* the monitor will not be considered missed for.
|
|
29
|
+
*/
|
|
21
30
|
checkin_margin?: number;
|
|
31
|
+
/**
|
|
32
|
+
* The allowed allowed duration in minutes that the monitor may be `in_progress`
|
|
33
|
+
* for before being considered failed due to timeout.
|
|
34
|
+
*/
|
|
22
35
|
max_runtime?: number;
|
|
36
|
+
/**
|
|
37
|
+
* A tz database string representing the timezone which the monitor's execution schedule is in.
|
|
38
|
+
* See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
39
|
+
*/
|
|
23
40
|
timezone?: string;
|
|
41
|
+
/** How many consecutive failed check-ins it takes to create an issue. */
|
|
24
42
|
failure_issue_threshold?: number;
|
|
43
|
+
/** How many consecutive OK check-ins it takes to resolve an issue. */
|
|
25
44
|
recovery_threshold?: number;
|
|
26
45
|
};
|
|
27
46
|
contexts?: {
|
|
@@ -29,27 +48,52 @@ export interface SerializedCheckIn {
|
|
|
29
48
|
};
|
|
30
49
|
}
|
|
31
50
|
export interface HeartbeatCheckIn {
|
|
51
|
+
/** The distinct slug of the monitor. */
|
|
32
52
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
53
|
+
/** The status of the check-in. */
|
|
33
54
|
status: 'ok' | 'error';
|
|
34
55
|
}
|
|
35
56
|
export interface InProgressCheckIn {
|
|
57
|
+
/** The distinct slug of the monitor. */
|
|
36
58
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
59
|
+
/** The status of the check-in. */
|
|
37
60
|
status: 'in_progress';
|
|
38
61
|
}
|
|
39
62
|
export interface FinishedCheckIn {
|
|
63
|
+
/** The distinct slug of the monitor. */
|
|
40
64
|
monitorSlug: SerializedCheckIn['monitor_slug'];
|
|
65
|
+
/** The status of the check-in. */
|
|
41
66
|
status: 'ok' | 'error';
|
|
67
|
+
/** Check-In ID (unique and client generated). */
|
|
42
68
|
checkInId: SerializedCheckIn['check_in_id'];
|
|
69
|
+
/** The duration of the check-in in seconds. Will only take effect if the status is ok or error. */
|
|
43
70
|
duration?: SerializedCheckIn['duration'];
|
|
44
71
|
}
|
|
45
72
|
export type CheckIn = HeartbeatCheckIn | InProgressCheckIn | FinishedCheckIn;
|
|
46
73
|
type SerializedMonitorConfig = NonNullable<SerializedCheckIn['monitor_config']>;
|
|
47
74
|
export interface MonitorConfig {
|
|
75
|
+
/**
|
|
76
|
+
* The schedule on which the monitor should run. Either a crontab schedule string or an interval.
|
|
77
|
+
*/
|
|
48
78
|
schedule: MonitorSchedule;
|
|
79
|
+
/**
|
|
80
|
+
* The allowed allowed margin of minutes after the expected check-in time that
|
|
81
|
+
* the monitor will not be considered missed for.
|
|
82
|
+
*/
|
|
49
83
|
checkinMargin?: SerializedMonitorConfig['checkin_margin'];
|
|
84
|
+
/**
|
|
85
|
+
* The allowed allowed duration in minutes that the monitor may be `in_progress`
|
|
86
|
+
* for before being considered failed due to timeout.
|
|
87
|
+
*/
|
|
50
88
|
maxRuntime?: SerializedMonitorConfig['max_runtime'];
|
|
89
|
+
/**
|
|
90
|
+
* A tz database string representing the timezone which the monitor's execution schedule is in.
|
|
91
|
+
* See: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
92
|
+
*/
|
|
51
93
|
timezone?: SerializedMonitorConfig['timezone'];
|
|
94
|
+
/** How many consecutive failed check-ins it takes to create an issue. */
|
|
52
95
|
failureIssueThreshold?: SerializedMonitorConfig['failure_issue_threshold'];
|
|
96
|
+
/** How many consecutive OK check-ins it takes to resolve an issue. */
|
|
53
97
|
recoveryThreshold?: SerializedMonitorConfig['recovery_threshold'];
|
|
54
98
|
}
|
|
55
99
|
export {};
|
|
@@ -170,8 +170,8 @@ export interface Scope {
|
|
|
170
170
|
/** Clears the current scope and resets its properties. */
|
|
171
171
|
clear(): this;
|
|
172
172
|
/**
|
|
173
|
-
*
|
|
174
|
-
* @param
|
|
173
|
+
* Adds a breadcrumb to the scope
|
|
174
|
+
* @param breadcrumb Breadcrumb
|
|
175
175
|
* @param maxBreadcrumbs number of max breadcrumbs to merged into event.
|
|
176
176
|
*/
|
|
177
177
|
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;
|
|
@@ -180,7 +180,7 @@ export interface Scope {
|
|
|
180
180
|
*/
|
|
181
181
|
getLastBreadcrumb(): Breadcrumb | undefined;
|
|
182
182
|
/**
|
|
183
|
-
* Clears all
|
|
183
|
+
* Clears all breadcrumbs from the scope.
|
|
184
184
|
*/
|
|
185
185
|
clearBreadcrumbs(): this;
|
|
186
186
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/types",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.33.0",
|
|
4
4
|
"description": "Types for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/types",
|