@minecraft/diagnostics 1.0.0-beta.1.21.95-stable → 1.0.0-beta.1.26.0-preview.25
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/index.d.ts +48 -16
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -24,15 +24,16 @@
|
|
|
24
24
|
import * as minecraftcommon from '@minecraft/common';
|
|
25
25
|
import * as minecraftserveradmin from '@minecraft/server-admin';
|
|
26
26
|
/**
|
|
27
|
-
* This defines the severity level of
|
|
28
|
-
* are used in the UI to
|
|
29
|
-
*
|
|
30
|
-
* information:
|
|
27
|
+
* This defines the severity level of an error, event,
|
|
28
|
+
* exception, or breadcrumb. Levels are used in the UI to
|
|
29
|
+
* emphasize and deemphasize breadcrumbs. See Sentry
|
|
30
|
+
* documentation for more information:
|
|
31
31
|
* https://docs.sentry.io/product/issues/issue-details/breadcrumbs/
|
|
32
32
|
*/
|
|
33
|
-
export enum
|
|
33
|
+
export enum SentryEventLevel {
|
|
34
34
|
debug = 'debug',
|
|
35
35
|
error = 'error',
|
|
36
|
+
fatal = 'fatal',
|
|
36
37
|
info = 'info',
|
|
37
38
|
warning = 'warning',
|
|
38
39
|
}
|
|
@@ -50,8 +51,6 @@ export class Sentry {
|
|
|
50
51
|
* up to an error. See Sentry documentation for more details:
|
|
51
52
|
* https://docs.sentry.io/product/issues/issue-details/breadcrumbs/
|
|
52
53
|
*
|
|
53
|
-
* This function can't be called in read-only mode.
|
|
54
|
-
*
|
|
55
54
|
* This function can be called in early-execution mode.
|
|
56
55
|
*
|
|
57
56
|
* @param message
|
|
@@ -62,15 +61,13 @@ export class Sentry {
|
|
|
62
61
|
*
|
|
63
62
|
* {@link SentryUninitializedError}
|
|
64
63
|
*/
|
|
65
|
-
addBreadcrumb(level:
|
|
64
|
+
addBreadcrumb(level: SentryEventLevel, message: string, category?: string): void;
|
|
66
65
|
/**
|
|
67
66
|
* @remarks
|
|
68
67
|
* Adds a tag to the Sentry session. See Sentry documentation
|
|
69
68
|
* for more details:
|
|
70
69
|
* https://docs.sentry.io/platforms/javascript/enriching-events/tags/
|
|
71
70
|
*
|
|
72
|
-
* This function can't be called in read-only mode.
|
|
73
|
-
*
|
|
74
71
|
* This function can be called in early-execution mode.
|
|
75
72
|
*
|
|
76
73
|
* @throws This function can throw errors.
|
|
@@ -78,14 +75,28 @@ export class Sentry {
|
|
|
78
75
|
* {@link SentryUninitializedError}
|
|
79
76
|
*/
|
|
80
77
|
addTag(name: string, value: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* @remarks
|
|
80
|
+
* Captures an exception event and send it to Sentry. Note that
|
|
81
|
+
* you can pass not only `Error` objects, but also other types
|
|
82
|
+
* of thrown objects - in that case, an attempt will be made to
|
|
83
|
+
* serialize the object for you, and stack traces are likely to
|
|
84
|
+
* be missing. See Sentry documentation for more details:
|
|
85
|
+
* https://docs.sentry.io/platforms/javascript/apis/#capturing-events
|
|
86
|
+
*
|
|
87
|
+
* This function can be called in early-execution mode.
|
|
88
|
+
*
|
|
89
|
+
* @throws This function can throw errors.
|
|
90
|
+
*
|
|
91
|
+
* {@link SentryUninitializedError}
|
|
92
|
+
*/
|
|
93
|
+
captureException(exception: unknown, captureContext?: SentryCaptureContext): void;
|
|
81
94
|
/**
|
|
82
95
|
* @remarks
|
|
83
96
|
* Gets the list of all session tags. See Sentry documentation
|
|
84
97
|
* for more details:
|
|
85
98
|
* https://docs.sentry.io/platforms/javascript/enriching-events/tags/
|
|
86
99
|
*
|
|
87
|
-
* This function can't be called in read-only mode.
|
|
88
|
-
*
|
|
89
100
|
* This function can be called in early-execution mode.
|
|
90
101
|
*
|
|
91
102
|
* @throws This function can throw errors.
|
|
@@ -98,8 +109,6 @@ export class Sentry {
|
|
|
98
109
|
* Initializes Sentry for use. This must be successfully
|
|
99
110
|
* called before any other Sentry functions are called.
|
|
100
111
|
*
|
|
101
|
-
* This function can't be called in read-only mode.
|
|
102
|
-
*
|
|
103
112
|
* This function can be called in early-execution mode.
|
|
104
113
|
*
|
|
105
114
|
* @throws This function can throw errors.
|
|
@@ -115,8 +124,6 @@ export class Sentry {
|
|
|
115
124
|
* documentation for more details:
|
|
116
125
|
* https://docs.sentry.io/platforms/javascript/enriching-events/tags/
|
|
117
126
|
*
|
|
118
|
-
* This function can't be called in read-only mode.
|
|
119
|
-
*
|
|
120
127
|
* This function can be called in early-execution mode.
|
|
121
128
|
*
|
|
122
129
|
* @throws This function can throw errors.
|
|
@@ -126,6 +133,31 @@ export class Sentry {
|
|
|
126
133
|
removeTag(name: string): void;
|
|
127
134
|
}
|
|
128
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Context relating to a captured exception that should be sent
|
|
138
|
+
* to Sentry.
|
|
139
|
+
*/
|
|
140
|
+
export interface SentryCaptureContext {
|
|
141
|
+
/**
|
|
142
|
+
* @remarks
|
|
143
|
+
* Additional data that should be sent with the exception.
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
extraData?: Record<string, boolean | number | string>;
|
|
147
|
+
/**
|
|
148
|
+
* @remarks
|
|
149
|
+
* The indicated level of severity of the captured exception.
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
level?: SentryEventLevel;
|
|
153
|
+
/**
|
|
154
|
+
* @remarks
|
|
155
|
+
* Additional tags that should be sent with the exception.
|
|
156
|
+
*
|
|
157
|
+
*/
|
|
158
|
+
tags?: Record<string, string>;
|
|
159
|
+
}
|
|
160
|
+
|
|
129
161
|
/**
|
|
130
162
|
* Describes options for configuring Sentry for this scripting
|
|
131
163
|
* module.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/diagnostics",
|
|
3
|
-
"version": "1.0.0-beta.1.
|
|
3
|
+
"version": "1.0.0-beta.1.26.0-preview.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"email": "mikeam@microsoft.com"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
-
"
|
|
15
|
+
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server-admin": "^1.0.0-beta.1.
|
|
17
|
+
"@minecraft/server-admin": "^1.0.0-beta.1.26.0-preview.25"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|