@sentry/browser 9.9.0 → 9.10.1
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/npm/cjs/diagnose-sdk.js +46 -0
- package/build/npm/cjs/diagnose-sdk.js.map +1 -0
- package/build/npm/cjs/index.js +2 -0
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/cjs/log.js +99 -27
- package/build/npm/cjs/log.js.map +1 -1
- package/build/npm/esm/diagnose-sdk.js +44 -0
- package/build/npm/esm/diagnose-sdk.js.map +1 -0
- package/build/npm/esm/index.js +1 -0
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/log.js +100 -27
- package/build/npm/esm/log.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/diagnose-sdk.d.ts +11 -0
- package/build/npm/types/diagnose-sdk.d.ts.map +1 -0
- package/build/npm/types/index.d.ts +1 -0
- package/build/npm/types/index.d.ts.map +1 -1
- package/build/npm/types/log.d.ts +104 -28
- package/build/npm/types/log.d.ts.map +1 -1
- package/build/npm/types-ts3.8/diagnose-sdk.d.ts +11 -0
- package/build/npm/types-ts3.8/index.d.ts +1 -0
- package/build/npm/types-ts3.8/log.d.ts +104 -28
- package/package.json +7 -7
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A function to diagnose why the SDK might not be successfully sending data.
|
|
7
|
+
*
|
|
8
|
+
* Possible return values wrapped in a Promise:
|
|
9
|
+
* - `"no-client-active"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
|
|
10
|
+
* - `"sentry-unreachable"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
|
|
11
|
+
*
|
|
12
|
+
* If the function doesn't detect an issue it resolves to `undefined`.
|
|
13
|
+
*/
|
|
14
|
+
async function diagnoseSdkConnectivity()
|
|
15
|
+
|
|
16
|
+
{
|
|
17
|
+
const client = core.getClient();
|
|
18
|
+
|
|
19
|
+
if (!client) {
|
|
20
|
+
return 'no-client-active';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!client.getDsn()) {
|
|
24
|
+
return 'no-dsn-configured';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
// If fetch throws, there is likely an ad blocker active or there are other connective issues.
|
|
29
|
+
await fetch(
|
|
30
|
+
// We want this to be as close as possible to an actual ingest URL so that ad blockers will actually block the request
|
|
31
|
+
// We are using the "sentry-sdks" org with id 447951 not to pollute any actual organizations.
|
|
32
|
+
'https://o447951.ingest.sentry.io/api/1337/envelope/?sentry_version=7&sentry_key=1337&sentry_client=sentry.javascript.browser%2F1.33.7',
|
|
33
|
+
{
|
|
34
|
+
body: '{}',
|
|
35
|
+
method: 'POST',
|
|
36
|
+
mode: 'cors',
|
|
37
|
+
credentials: 'omit',
|
|
38
|
+
},
|
|
39
|
+
);
|
|
40
|
+
} catch {
|
|
41
|
+
return 'sentry-unreachable';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.diagnoseSdkConnectivity = diagnoseSdkConnectivity;
|
|
46
|
+
//# sourceMappingURL=diagnose-sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose-sdk.js","sources":["../../../src/diagnose-sdk.ts"],"sourcesContent":["import { getClient } from '@sentry/core';\n\n/**\n * A function to diagnose why the SDK might not be successfully sending data.\n *\n * Possible return values wrapped in a Promise:\n * - `\"no-client-active\"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.\n * - `\"sentry-unreachable\"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.\n *\n * If the function doesn't detect an issue it resolves to `undefined`.\n */\nexport async function diagnoseSdkConnectivity(): Promise<\n 'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void\n> {\n const client = getClient();\n\n if (!client) {\n return 'no-client-active';\n }\n\n if (!client.getDsn()) {\n return 'no-dsn-configured';\n }\n\n try {\n // If fetch throws, there is likely an ad blocker active or there are other connective issues.\n await fetch(\n // We want this to be as close as possible to an actual ingest URL so that ad blockers will actually block the request\n // We are using the \"sentry-sdks\" org with id 447951 not to pollute any actual organizations.\n 'https://o447951.ingest.sentry.io/api/1337/envelope/?sentry_version=7&sentry_key=1337&sentry_client=sentry.javascript.browser%2F1.33.7',\n {\n body: '{}',\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n },\n );\n } catch {\n return 'sentry-unreachable';\n }\n}\n"],"names":["getClient"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,uBAAuB;;AAE7C,CAAE;AACF,EAAE,MAAM,MAAA,GAASA,cAAS,EAAE;;AAE5B,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,OAAO,kBAAkB;AAC7B;;AAEA,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE;AACxB,IAAI,OAAO,mBAAmB;AAC9B;;AAEA,EAAE,IAAI;AACN;AACA,IAAI,MAAM,KAAK;AACf;AACA;AACA,MAAM,uIAAuI;AAC7I,MAAM;AACN,QAAQ,IAAI,EAAE,IAAI;AAClB,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,IAAI,EAAE,MAAM;AACpB,QAAQ,WAAW,EAAE,MAAM;AAC3B,OAAO;AACP,KAAK;AACL,IAAI,MAAM;AACV,IAAI,OAAO,oBAAoB;AAC/B;AACA;;;;"}
|
package/build/npm/cjs/index.js
CHANGED
|
@@ -35,6 +35,7 @@ const integration$1 = require('./integrations/featureFlags/launchdarkly/integrat
|
|
|
35
35
|
const integration$2 = require('./integrations/featureFlags/openfeature/integration.js');
|
|
36
36
|
const integration$3 = require('./integrations/featureFlags/unleash/integration.js');
|
|
37
37
|
const integration$4 = require('./integrations/featureFlags/statsig/integration.js');
|
|
38
|
+
const diagnoseSdk = require('./diagnose-sdk.js');
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
|
|
@@ -156,4 +157,5 @@ exports.OpenFeatureIntegrationHook = integration$2.OpenFeatureIntegrationHook;
|
|
|
156
157
|
exports.openFeatureIntegration = integration$2.openFeatureIntegration;
|
|
157
158
|
exports.unleashIntegration = integration$3.unleashIntegration;
|
|
158
159
|
exports.statsigIntegration = integration$4.statsigIntegration;
|
|
160
|
+
exports.diagnoseSdkConnectivity = diagnoseSdk.diagnoseSdkConnectivity;
|
|
159
161
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/npm/cjs/log.js
CHANGED
|
@@ -77,12 +77,25 @@ function captureLog(
|
|
|
77
77
|
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
78
78
|
*
|
|
79
79
|
* @param message - The message to log.
|
|
80
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
80
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
83
|
*
|
|
84
84
|
* ```
|
|
85
|
-
* Sentry.logger.trace('
|
|
85
|
+
* Sentry.logger.trace('User clicked submit button', {
|
|
86
|
+
* buttonId: 'submit-form',
|
|
87
|
+
* formId: 'user-profile',
|
|
88
|
+
* timestamp: Date.now()
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @example With template strings
|
|
93
|
+
*
|
|
94
|
+
* ```
|
|
95
|
+
* Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {
|
|
96
|
+
* userId: '123',
|
|
97
|
+
* sessionId: 'abc-xyz'
|
|
98
|
+
* });
|
|
86
99
|
* ```
|
|
87
100
|
*/
|
|
88
101
|
function trace(message, attributes) {
|
|
@@ -93,12 +106,26 @@ function trace(message, attributes) {
|
|
|
93
106
|
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
94
107
|
*
|
|
95
108
|
* @param message - The message to log.
|
|
96
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
109
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.
|
|
97
110
|
*
|
|
98
111
|
* @example
|
|
99
112
|
*
|
|
100
113
|
* ```
|
|
101
|
-
* Sentry.logger.debug('
|
|
114
|
+
* Sentry.logger.debug('Component mounted', {
|
|
115
|
+
* component: 'UserProfile',
|
|
116
|
+
* props: { userId: 123 },
|
|
117
|
+
* renderTime: 150
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example With template strings
|
|
122
|
+
*
|
|
123
|
+
* ```
|
|
124
|
+
* Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {
|
|
125
|
+
* statusCode: 404,
|
|
126
|
+
* requestId: 'req-123',
|
|
127
|
+
* duration: 250
|
|
128
|
+
* });
|
|
102
129
|
* ```
|
|
103
130
|
*/
|
|
104
131
|
function debug(message, attributes) {
|
|
@@ -109,12 +136,26 @@ function debug(message, attributes) {
|
|
|
109
136
|
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
110
137
|
*
|
|
111
138
|
* @param message - The message to log.
|
|
112
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
139
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.
|
|
113
140
|
*
|
|
114
141
|
* @example
|
|
115
142
|
*
|
|
116
143
|
* ```
|
|
117
|
-
* Sentry.logger.info('
|
|
144
|
+
* Sentry.logger.info('User completed checkout', {
|
|
145
|
+
* orderId: 'order-123',
|
|
146
|
+
* amount: 99.99,
|
|
147
|
+
* paymentMethod: 'credit_card'
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* @example With template strings
|
|
152
|
+
*
|
|
153
|
+
* ```
|
|
154
|
+
* Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {
|
|
155
|
+
* userId: 'user-123',
|
|
156
|
+
* imageSize: '2.5MB',
|
|
157
|
+
* timestamp: Date.now()
|
|
158
|
+
* });
|
|
118
159
|
* ```
|
|
119
160
|
*/
|
|
120
161
|
function info(message, attributes) {
|
|
@@ -125,12 +166,27 @@ function info(message, attributes) {
|
|
|
125
166
|
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
126
167
|
*
|
|
127
168
|
* @param message - The message to log.
|
|
128
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
169
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.
|
|
129
170
|
*
|
|
130
171
|
* @example
|
|
131
172
|
*
|
|
132
173
|
* ```
|
|
133
|
-
* Sentry.logger.warn('
|
|
174
|
+
* Sentry.logger.warn('Browser compatibility issue detected', {
|
|
175
|
+
* browser: 'Safari',
|
|
176
|
+
* version: '14.0',
|
|
177
|
+
* feature: 'WebRTC',
|
|
178
|
+
* fallback: 'enabled'
|
|
179
|
+
* });
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @example With template strings
|
|
183
|
+
*
|
|
184
|
+
* ```
|
|
185
|
+
* Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {
|
|
186
|
+
* recommendedEndpoint: '/api/v2/users',
|
|
187
|
+
* sunsetDate: '2024-12-31',
|
|
188
|
+
* clientVersion: '1.2.3'
|
|
189
|
+
* });
|
|
134
190
|
* ```
|
|
135
191
|
*/
|
|
136
192
|
function warn(message, attributes) {
|
|
@@ -141,12 +197,28 @@ function warn(message, attributes) {
|
|
|
141
197
|
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
142
198
|
*
|
|
143
199
|
* @param message - The message to log.
|
|
144
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
200
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.
|
|
145
201
|
*
|
|
146
202
|
* @example
|
|
147
203
|
*
|
|
148
204
|
* ```
|
|
149
|
-
* Sentry.logger.error('
|
|
205
|
+
* Sentry.logger.error('Failed to load user data', {
|
|
206
|
+
* error: 'NetworkError',
|
|
207
|
+
* url: '/api/users/123',
|
|
208
|
+
* statusCode: 500,
|
|
209
|
+
* retryCount: 3
|
|
210
|
+
* });
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* @example With template strings
|
|
214
|
+
*
|
|
215
|
+
* ```
|
|
216
|
+
* Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {
|
|
217
|
+
* error: 'InsufficientFunds',
|
|
218
|
+
* amount: 100.00,
|
|
219
|
+
* currency: 'USD',
|
|
220
|
+
* userId: 'user-456'
|
|
221
|
+
* });
|
|
150
222
|
* ```
|
|
151
223
|
*/
|
|
152
224
|
function error(message, attributes) {
|
|
@@ -157,35 +229,35 @@ function error(message, attributes) {
|
|
|
157
229
|
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
158
230
|
*
|
|
159
231
|
* @param message - The message to log.
|
|
160
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
232
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.
|
|
161
233
|
*
|
|
162
234
|
* @example
|
|
163
235
|
*
|
|
164
236
|
* ```
|
|
165
|
-
* Sentry.logger.fatal('
|
|
237
|
+
* Sentry.logger.fatal('Application state corrupted', {
|
|
238
|
+
* lastKnownState: 'authenticated',
|
|
239
|
+
* sessionId: 'session-123',
|
|
240
|
+
* timestamp: Date.now(),
|
|
241
|
+
* recoveryAttempted: true
|
|
242
|
+
* });
|
|
166
243
|
* ```
|
|
167
|
-
*/
|
|
168
|
-
function fatal(message, attributes) {
|
|
169
|
-
captureLog('fatal', message, attributes);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.
|
|
174
244
|
*
|
|
175
|
-
* @
|
|
176
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
177
|
-
*
|
|
178
|
-
* @example
|
|
245
|
+
* @example With template strings
|
|
179
246
|
*
|
|
180
247
|
* ```
|
|
181
|
-
* Sentry.logger.
|
|
248
|
+
* Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {
|
|
249
|
+
* service: 'payment-processor',
|
|
250
|
+
* errorCode: 'CRITICAL_FAILURE',
|
|
251
|
+
* affectedUsers: 150,
|
|
252
|
+
* timestamp: Date.now()
|
|
253
|
+
* });
|
|
182
254
|
* ```
|
|
183
255
|
*/
|
|
184
|
-
function
|
|
185
|
-
captureLog('
|
|
256
|
+
function fatal(message, attributes) {
|
|
257
|
+
captureLog('fatal', message, attributes);
|
|
186
258
|
}
|
|
187
259
|
|
|
188
|
-
exports.
|
|
260
|
+
exports.fmt = core.fmt;
|
|
189
261
|
exports.debug = debug;
|
|
190
262
|
exports.error = error;
|
|
191
263
|
exports.fatal = fatal;
|
package/build/npm/cjs/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sources":["../../../src/log.ts"],"sourcesContent":["import type { LogSeverityLevel, Log, Client } from '@sentry/core';\nimport { getClient, _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer } from '@sentry/core';\n\nimport { WINDOW } from './helpers';\n\n/**\n * TODO: Make this configurable\n */\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\nlet timeout: ReturnType<typeof setTimeout> | undefined;\n\n/**\n * This is a global timeout that is used to flush the logs buffer.\n * It is used to ensure that logs are flushed even if the client is not flushed.\n */\nfunction startFlushTimeout(client: Client): void {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(client);\n }, DEFAULT_FLUSH_INTERVAL);\n}\n\nlet isClientListenerAdded = false;\n/**\n * This is a function that is used to add a flush listener to the client.\n * It is used to ensure that the logger buffer is flushed when the client is flushed.\n */\nfunction addFlushingListeners(client: Client): void {\n if (isClientListenerAdded || !client.getOptions()._experiments?.enableLogs) {\n return;\n }\n\n isClientListenerAdded = true;\n\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n _INTERNAL_flushLogsBuffer(client);\n }\n });\n }\n\n client.on('flush', () => {\n _INTERNAL_flushLogsBuffer(client);\n });\n}\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n level: LogSeverityLevel,\n message: string,\n attributes?: Log['attributes'],\n severityNumber?: Log['severityNumber'],\n): void {\n const client = getClient();\n if (client) {\n addFlushingListeners(client);\n\n startFlushTimeout(client);\n }\n\n _INTERNAL_captureLog({ level, message, attributes, severityNumber }, client, undefined);\n}\n\n/**\n * @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('Hello world', { userId: 100 });\n * ```\n */\nexport function trace(message: string, attributes?: Log['attributes']): void {\n captureLog('trace', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Hello world', { userId: 100 });\n * ```\n */\nexport function debug(message: string, attributes?: Log['attributes']): void {\n captureLog('debug', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('Hello world', { userId: 100 });\n * ```\n */\nexport function info(message: string, attributes?: Log['attributes']): void {\n captureLog('info', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Hello world', { userId: 100 });\n * ```\n */\nexport function warn(message: string, attributes?: Log['attributes']): void {\n captureLog('warn', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Hello world', { userId: 100 });\n * ```\n */\nexport function error(message: string, attributes?: Log['attributes']): void {\n captureLog('error', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Hello world', { userId: 100 });\n * ```\n */\nexport function fatal(message: string, attributes?: Log['attributes']): void {\n captureLog('fatal', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.critical('Hello world', { userId: 100 });\n * ```\n */\nexport function critical(message: string, attributes?: Log['attributes']): void {\n captureLog('critical', message, attributes);\n}\n"],"names":["_INTERNAL_flushLogsBuffer","WINDOW","getClient","_INTERNAL_captureLog"],"mappings":";;;;;AAKA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI;;AAEnC,IAAI,OAAO;;AAEX;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,MAAM,EAAgB;AACjD,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,YAAY,CAAC,OAAO,CAAC;AACzB;;AAEA,EAAE,UAAU,UAAU,CAAC,MAAM;AAC7B,IAAIA,8BAAyB,CAAC,MAAM,CAAC;AACrC,GAAG,EAAE,sBAAsB,CAAC;AAC5B;;AAEA,IAAI,qBAAA,GAAwB,KAAK;AACjC;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,MAAM,EAAgB;AACpD,EAAE,IAAI,qBAAsB,IAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE;AAC9E,IAAI;AACJ;;AAEA,EAAE,qBAAA,GAAwB,IAAI;;AAE9B,EAAE,IAAIC,cAAM,CAAC,QAAQ,EAAE;AACvB,IAAIA,cAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;AAC/D,MAAM,IAAIA,cAAM,CAAC,QAAQ,CAAC,eAAA,KAAoB,QAAQ,EAAE;AACxD,QAAQD,8BAAyB,CAAC,MAAM,CAAC;AACzC;AACA,KAAK,CAAC;AACN;;AAEA,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,EAA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;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAU,UAAU,EAA4B;AAC7E,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAU,UAAU,EAA4B;AAC7E,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,OAAO,EAAU,UAAU,EAA4B;AAChF,EAAE,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;AAC7C;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"log.js","sources":["../../../src/log.ts"],"sourcesContent":["import type { LogSeverityLevel, Log, Client, ParameterizedString } from '@sentry/core';\nimport { getClient, _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer } from '@sentry/core';\n\nimport { WINDOW } from './helpers';\n\n/**\n * TODO: Make this configurable\n */\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\nlet timeout: ReturnType<typeof setTimeout> | undefined;\n\n/**\n * This is a global timeout that is used to flush the logs buffer.\n * It is used to ensure that logs are flushed even if the client is not flushed.\n */\nfunction startFlushTimeout(client: Client): void {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(client);\n }, DEFAULT_FLUSH_INTERVAL);\n}\n\nlet isClientListenerAdded = false;\n/**\n * This is a function that is used to add a flush listener to the client.\n * It is used to ensure that the logger buffer is flushed when the client is flushed.\n */\nfunction addFlushingListeners(client: Client): void {\n if (isClientListenerAdded || !client.getOptions()._experiments?.enableLogs) {\n return;\n }\n\n isClientListenerAdded = true;\n\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n _INTERNAL_flushLogsBuffer(client);\n }\n });\n }\n\n client.on('flush', () => {\n _INTERNAL_flushLogsBuffer(client);\n });\n}\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n level: LogSeverityLevel,\n message: ParameterizedString,\n attributes?: Log['attributes'],\n severityNumber?: Log['severityNumber'],\n): void {\n const client = getClient();\n if (client) {\n addFlushingListeners(client);\n\n startFlushTimeout(client);\n }\n\n _INTERNAL_captureLog({ level, message, attributes, severityNumber }, client, undefined);\n}\n\n/**\n * @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('User clicked submit button', {\n * buttonId: 'submit-form',\n * formId: 'user-profile',\n * timestamp: Date.now()\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {\n * userId: '123',\n * sessionId: 'abc-xyz'\n * });\n * ```\n */\nexport function trace(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('trace', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Component mounted', {\n * component: 'UserProfile',\n * props: { userId: 123 },\n * renderTime: 150\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {\n * statusCode: 404,\n * requestId: 'req-123',\n * duration: 250\n * });\n * ```\n */\nexport function debug(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('debug', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('User completed checkout', {\n * orderId: 'order-123',\n * amount: 99.99,\n * paymentMethod: 'credit_card'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {\n * userId: 'user-123',\n * imageSize: '2.5MB',\n * timestamp: Date.now()\n * });\n * ```\n */\nexport function info(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('info', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Browser compatibility issue detected', {\n * browser: 'Safari',\n * version: '14.0',\n * feature: 'WebRTC',\n * fallback: 'enabled'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {\n * recommendedEndpoint: '/api/v2/users',\n * sunsetDate: '2024-12-31',\n * clientVersion: '1.2.3'\n * });\n * ```\n */\nexport function warn(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('warn', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Failed to load user data', {\n * error: 'NetworkError',\n * url: '/api/users/123',\n * statusCode: 500,\n * retryCount: 3\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {\n * error: 'InsufficientFunds',\n * amount: 100.00,\n * currency: 'USD',\n * userId: 'user-456'\n * });\n * ```\n */\nexport function error(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('error', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Application state corrupted', {\n * lastKnownState: 'authenticated',\n * sessionId: 'session-123',\n * timestamp: Date.now(),\n * recoveryAttempted: true\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {\n * service: 'payment-processor',\n * errorCode: 'CRITICAL_FAILURE',\n * affectedUsers: 150,\n * timestamp: Date.now()\n * });\n * ```\n */\nexport function fatal(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('fatal', message, attributes);\n}\n\nexport { fmt } from '@sentry/core';\n"],"names":["_INTERNAL_flushLogsBuffer","WINDOW","getClient","_INTERNAL_captureLog"],"mappings":";;;;;AAKA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI;;AAEnC,IAAI,OAAO;;AAEX;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,MAAM,EAAgB;AACjD,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,YAAY,CAAC,OAAO,CAAC;AACzB;;AAEA,EAAE,UAAU,UAAU,CAAC,MAAM;AAC7B,IAAIA,8BAAyB,CAAC,MAAM,CAAC;AACrC,GAAG,EAAE,sBAAsB,CAAC;AAC5B;;AAEA,IAAI,qBAAA,GAAwB,KAAK;AACjC;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,MAAM,EAAgB;AACpD,EAAE,IAAI,qBAAsB,IAAG,CAAC,MAAM,CAAC,UAAU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;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAuB,UAAU,EAA4B;AAC1F,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuB,UAAU,EAA4B;AACzF,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuB,UAAU,EAA4B;AACzF,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAuB,UAAU,EAA4B;AAC1F,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAuB,UAAU,EAA4B;AAC1F,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getClient } from '@sentry/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A function to diagnose why the SDK might not be successfully sending data.
|
|
5
|
+
*
|
|
6
|
+
* Possible return values wrapped in a Promise:
|
|
7
|
+
* - `"no-client-active"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
|
|
8
|
+
* - `"sentry-unreachable"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
|
|
9
|
+
*
|
|
10
|
+
* If the function doesn't detect an issue it resolves to `undefined`.
|
|
11
|
+
*/
|
|
12
|
+
async function diagnoseSdkConnectivity()
|
|
13
|
+
|
|
14
|
+
{
|
|
15
|
+
const client = getClient();
|
|
16
|
+
|
|
17
|
+
if (!client) {
|
|
18
|
+
return 'no-client-active';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!client.getDsn()) {
|
|
22
|
+
return 'no-dsn-configured';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
// If fetch throws, there is likely an ad blocker active or there are other connective issues.
|
|
27
|
+
await fetch(
|
|
28
|
+
// We want this to be as close as possible to an actual ingest URL so that ad blockers will actually block the request
|
|
29
|
+
// We are using the "sentry-sdks" org with id 447951 not to pollute any actual organizations.
|
|
30
|
+
'https://o447951.ingest.sentry.io/api/1337/envelope/?sentry_version=7&sentry_key=1337&sentry_client=sentry.javascript.browser%2F1.33.7',
|
|
31
|
+
{
|
|
32
|
+
body: '{}',
|
|
33
|
+
method: 'POST',
|
|
34
|
+
mode: 'cors',
|
|
35
|
+
credentials: 'omit',
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
} catch {
|
|
39
|
+
return 'sentry-unreachable';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { diagnoseSdkConnectivity };
|
|
44
|
+
//# sourceMappingURL=diagnose-sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose-sdk.js","sources":["../../../src/diagnose-sdk.ts"],"sourcesContent":["import { getClient } from '@sentry/core';\n\n/**\n * A function to diagnose why the SDK might not be successfully sending data.\n *\n * Possible return values wrapped in a Promise:\n * - `\"no-client-active\"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.\n * - `\"sentry-unreachable\"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.\n *\n * If the function doesn't detect an issue it resolves to `undefined`.\n */\nexport async function diagnoseSdkConnectivity(): Promise<\n 'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void\n> {\n const client = getClient();\n\n if (!client) {\n return 'no-client-active';\n }\n\n if (!client.getDsn()) {\n return 'no-dsn-configured';\n }\n\n try {\n // If fetch throws, there is likely an ad blocker active or there are other connective issues.\n await fetch(\n // We want this to be as close as possible to an actual ingest URL so that ad blockers will actually block the request\n // We are using the \"sentry-sdks\" org with id 447951 not to pollute any actual organizations.\n 'https://o447951.ingest.sentry.io/api/1337/envelope/?sentry_version=7&sentry_key=1337&sentry_client=sentry.javascript.browser%2F1.33.7',\n {\n body: '{}',\n method: 'POST',\n mode: 'cors',\n credentials: 'omit',\n },\n );\n } catch {\n return 'sentry-unreachable';\n }\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe,uBAAuB;;AAE7C,CAAE;AACF,EAAE,MAAM,MAAA,GAAS,SAAS,EAAE;;AAE5B,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,OAAO,kBAAkB;AAC7B;;AAEA,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE;AACxB,IAAI,OAAO,mBAAmB;AAC9B;;AAEA,EAAE,IAAI;AACN;AACA,IAAI,MAAM,KAAK;AACf;AACA;AACA,MAAM,uIAAuI;AAC7I,MAAM;AACN,QAAQ,IAAI,EAAE,IAAI;AAClB,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,IAAI,EAAE,MAAM;AACpB,QAAQ,WAAW,EAAE,MAAM;AAC3B,OAAO;AACP,KAAK;AACL,IAAI,MAAM;AACV,IAAI,OAAO,oBAAoB;AAC/B;AACA;;;;"}
|
package/build/npm/esm/index.js
CHANGED
|
@@ -34,4 +34,5 @@ export { buildLaunchDarklyFlagUsedHandler, launchDarklyIntegration } from './int
|
|
|
34
34
|
export { OpenFeatureIntegrationHook, openFeatureIntegration } from './integrations/featureFlags/openfeature/integration.js';
|
|
35
35
|
export { unleashIntegration } from './integrations/featureFlags/unleash/integration.js';
|
|
36
36
|
export { statsigIntegration } from './integrations/featureFlags/statsig/integration.js';
|
|
37
|
+
export { diagnoseSdkConnectivity } from './diagnose-sdk.js';
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/npm/esm/log.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getClient, _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer } from '@sentry/core';
|
|
2
|
+
export { fmt } from '@sentry/core';
|
|
2
3
|
import { WINDOW } from './helpers.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -75,12 +76,25 @@ function captureLog(
|
|
|
75
76
|
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
76
77
|
*
|
|
77
78
|
* @param message - The message to log.
|
|
78
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
79
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.
|
|
79
80
|
*
|
|
80
81
|
* @example
|
|
81
82
|
*
|
|
82
83
|
* ```
|
|
83
|
-
* Sentry.logger.trace('
|
|
84
|
+
* Sentry.logger.trace('User clicked submit button', {
|
|
85
|
+
* buttonId: 'submit-form',
|
|
86
|
+
* formId: 'user-profile',
|
|
87
|
+
* timestamp: Date.now()
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @example With template strings
|
|
92
|
+
*
|
|
93
|
+
* ```
|
|
94
|
+
* Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {
|
|
95
|
+
* userId: '123',
|
|
96
|
+
* sessionId: 'abc-xyz'
|
|
97
|
+
* });
|
|
84
98
|
* ```
|
|
85
99
|
*/
|
|
86
100
|
function trace(message, attributes) {
|
|
@@ -91,12 +105,26 @@ function trace(message, attributes) {
|
|
|
91
105
|
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
92
106
|
*
|
|
93
107
|
* @param message - The message to log.
|
|
94
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
108
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.
|
|
95
109
|
*
|
|
96
110
|
* @example
|
|
97
111
|
*
|
|
98
112
|
* ```
|
|
99
|
-
* Sentry.logger.debug('
|
|
113
|
+
* Sentry.logger.debug('Component mounted', {
|
|
114
|
+
* component: 'UserProfile',
|
|
115
|
+
* props: { userId: 123 },
|
|
116
|
+
* renderTime: 150
|
|
117
|
+
* });
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* @example With template strings
|
|
121
|
+
*
|
|
122
|
+
* ```
|
|
123
|
+
* Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {
|
|
124
|
+
* statusCode: 404,
|
|
125
|
+
* requestId: 'req-123',
|
|
126
|
+
* duration: 250
|
|
127
|
+
* });
|
|
100
128
|
* ```
|
|
101
129
|
*/
|
|
102
130
|
function debug(message, attributes) {
|
|
@@ -107,12 +135,26 @@ function debug(message, attributes) {
|
|
|
107
135
|
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
108
136
|
*
|
|
109
137
|
* @param message - The message to log.
|
|
110
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
138
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.
|
|
111
139
|
*
|
|
112
140
|
* @example
|
|
113
141
|
*
|
|
114
142
|
* ```
|
|
115
|
-
* Sentry.logger.info('
|
|
143
|
+
* Sentry.logger.info('User completed checkout', {
|
|
144
|
+
* orderId: 'order-123',
|
|
145
|
+
* amount: 99.99,
|
|
146
|
+
* paymentMethod: 'credit_card'
|
|
147
|
+
* });
|
|
148
|
+
* ```
|
|
149
|
+
*
|
|
150
|
+
* @example With template strings
|
|
151
|
+
*
|
|
152
|
+
* ```
|
|
153
|
+
* Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {
|
|
154
|
+
* userId: 'user-123',
|
|
155
|
+
* imageSize: '2.5MB',
|
|
156
|
+
* timestamp: Date.now()
|
|
157
|
+
* });
|
|
116
158
|
* ```
|
|
117
159
|
*/
|
|
118
160
|
function info(message, attributes) {
|
|
@@ -123,12 +165,27 @@ function info(message, attributes) {
|
|
|
123
165
|
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
124
166
|
*
|
|
125
167
|
* @param message - The message to log.
|
|
126
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
168
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.
|
|
127
169
|
*
|
|
128
170
|
* @example
|
|
129
171
|
*
|
|
130
172
|
* ```
|
|
131
|
-
* Sentry.logger.warn('
|
|
173
|
+
* Sentry.logger.warn('Browser compatibility issue detected', {
|
|
174
|
+
* browser: 'Safari',
|
|
175
|
+
* version: '14.0',
|
|
176
|
+
* feature: 'WebRTC',
|
|
177
|
+
* fallback: 'enabled'
|
|
178
|
+
* });
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* @example With template strings
|
|
182
|
+
*
|
|
183
|
+
* ```
|
|
184
|
+
* Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {
|
|
185
|
+
* recommendedEndpoint: '/api/v2/users',
|
|
186
|
+
* sunsetDate: '2024-12-31',
|
|
187
|
+
* clientVersion: '1.2.3'
|
|
188
|
+
* });
|
|
132
189
|
* ```
|
|
133
190
|
*/
|
|
134
191
|
function warn(message, attributes) {
|
|
@@ -139,12 +196,28 @@ function warn(message, attributes) {
|
|
|
139
196
|
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
140
197
|
*
|
|
141
198
|
* @param message - The message to log.
|
|
142
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
199
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.
|
|
143
200
|
*
|
|
144
201
|
* @example
|
|
145
202
|
*
|
|
146
203
|
* ```
|
|
147
|
-
* Sentry.logger.error('
|
|
204
|
+
* Sentry.logger.error('Failed to load user data', {
|
|
205
|
+
* error: 'NetworkError',
|
|
206
|
+
* url: '/api/users/123',
|
|
207
|
+
* statusCode: 500,
|
|
208
|
+
* retryCount: 3
|
|
209
|
+
* });
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @example With template strings
|
|
213
|
+
*
|
|
214
|
+
* ```
|
|
215
|
+
* Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {
|
|
216
|
+
* error: 'InsufficientFunds',
|
|
217
|
+
* amount: 100.00,
|
|
218
|
+
* currency: 'USD',
|
|
219
|
+
* userId: 'user-456'
|
|
220
|
+
* });
|
|
148
221
|
* ```
|
|
149
222
|
*/
|
|
150
223
|
function error(message, attributes) {
|
|
@@ -155,33 +228,33 @@ function error(message, attributes) {
|
|
|
155
228
|
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
156
229
|
*
|
|
157
230
|
* @param message - The message to log.
|
|
158
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
231
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.
|
|
159
232
|
*
|
|
160
233
|
* @example
|
|
161
234
|
*
|
|
162
235
|
* ```
|
|
163
|
-
* Sentry.logger.fatal('
|
|
236
|
+
* Sentry.logger.fatal('Application state corrupted', {
|
|
237
|
+
* lastKnownState: 'authenticated',
|
|
238
|
+
* sessionId: 'session-123',
|
|
239
|
+
* timestamp: Date.now(),
|
|
240
|
+
* recoveryAttempted: true
|
|
241
|
+
* });
|
|
164
242
|
* ```
|
|
165
|
-
*/
|
|
166
|
-
function fatal(message, attributes) {
|
|
167
|
-
captureLog('fatal', message, attributes);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.
|
|
172
243
|
*
|
|
173
|
-
* @
|
|
174
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
244
|
+
* @example With template strings
|
|
177
245
|
*
|
|
178
246
|
* ```
|
|
179
|
-
* Sentry.logger.
|
|
247
|
+
* Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {
|
|
248
|
+
* service: 'payment-processor',
|
|
249
|
+
* errorCode: 'CRITICAL_FAILURE',
|
|
250
|
+
* affectedUsers: 150,
|
|
251
|
+
* timestamp: Date.now()
|
|
252
|
+
* });
|
|
180
253
|
* ```
|
|
181
254
|
*/
|
|
182
|
-
function
|
|
183
|
-
captureLog('
|
|
255
|
+
function fatal(message, attributes) {
|
|
256
|
+
captureLog('fatal', message, attributes);
|
|
184
257
|
}
|
|
185
258
|
|
|
186
|
-
export {
|
|
259
|
+
export { debug, error, fatal, info, trace, warn };
|
|
187
260
|
//# sourceMappingURL=log.js.map
|
package/build/npm/esm/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sources":["../../../src/log.ts"],"sourcesContent":["import type { LogSeverityLevel, Log, Client } from '@sentry/core';\nimport { getClient, _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer } from '@sentry/core';\n\nimport { WINDOW } from './helpers';\n\n/**\n * TODO: Make this configurable\n */\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\nlet timeout: ReturnType<typeof setTimeout> | undefined;\n\n/**\n * This is a global timeout that is used to flush the logs buffer.\n * It is used to ensure that logs are flushed even if the client is not flushed.\n */\nfunction startFlushTimeout(client: Client): void {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(client);\n }, DEFAULT_FLUSH_INTERVAL);\n}\n\nlet isClientListenerAdded = false;\n/**\n * This is a function that is used to add a flush listener to the client.\n * It is used to ensure that the logger buffer is flushed when the client is flushed.\n */\nfunction addFlushingListeners(client: Client): void {\n if (isClientListenerAdded || !client.getOptions()._experiments?.enableLogs) {\n return;\n }\n\n isClientListenerAdded = true;\n\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n _INTERNAL_flushLogsBuffer(client);\n }\n });\n }\n\n client.on('flush', () => {\n _INTERNAL_flushLogsBuffer(client);\n });\n}\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n level: LogSeverityLevel,\n message: string,\n attributes?: Log['attributes'],\n severityNumber?: Log['severityNumber'],\n): void {\n const client = getClient();\n if (client) {\n addFlushingListeners(client);\n\n startFlushTimeout(client);\n }\n\n _INTERNAL_captureLog({ level, message, attributes, severityNumber }, client, undefined);\n}\n\n/**\n * @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('Hello world', { userId: 100 });\n * ```\n */\nexport function trace(message: string, attributes?: Log['attributes']): void {\n captureLog('trace', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Hello world', { userId: 100 });\n * ```\n */\nexport function debug(message: string, attributes?: Log['attributes']): void {\n captureLog('debug', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('Hello world', { userId: 100 });\n * ```\n */\nexport function info(message: string, attributes?: Log['attributes']): void {\n captureLog('info', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Hello world', { userId: 100 });\n * ```\n */\nexport function warn(message: string, attributes?: Log['attributes']): void {\n captureLog('warn', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Hello world', { userId: 100 });\n * ```\n */\nexport function error(message: string, attributes?: Log['attributes']): void {\n captureLog('error', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Hello world', { userId: 100 });\n * ```\n */\nexport function fatal(message: string, attributes?: Log['attributes']): void {\n captureLog('fatal', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n *\n * @example\n *\n * ```\n * Sentry.logger.critical('Hello world', { userId: 100 });\n * ```\n */\nexport function critical(message: string, attributes?: Log['attributes']): void {\n captureLog('critical', message, attributes);\n}\n"],"names":[],"mappings":";;;AAKA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI;;AAEnC,IAAI,OAAO;;AAEX;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,MAAM,EAAgB;AACjD,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,YAAY,CAAC,OAAO,CAAC;AACzB;;AAEA,EAAE,UAAU,UAAU,CAAC,MAAM;AAC7B,IAAI,yBAAyB,CAAC,MAAM,CAAC;AACrC,GAAG,EAAE,sBAAsB,CAAC;AAC5B;;AAEA,IAAI,qBAAA,GAAwB,KAAK;AACjC;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,MAAM,EAAgB;AACpD,EAAE,IAAI,qBAAsB,IAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE;AAC9E,IAAI;AACJ;;AAEA,EAAE,qBAAA,GAAwB,IAAI;;AAE9B,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;AAC/D,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,eAAA,KAAoB,QAAQ,EAAE;AACxD,QAAQ,yBAAyB,CAAC,MAAM,CAAC;AACzC;AACA,KAAK,CAAC;AACN;;AAEA,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM;AAC3B,IAAI,yBAAyB,CA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K,CAAC,OAAO,EAAU,UAAU,EAA4B;AAC7E,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAU,UAAU,EAA4B;AAC7E,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QAAQ,CAAC,OAAO,EAAU,UAAU,EAA4B;AAChF,EAAE,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;AAC7C;;;;"}
|
|
1
|
+
{"version":3,"file":"log.js","sources":["../../../src/log.ts"],"sourcesContent":["import type { LogSeverityLevel, Log, Client, ParameterizedString } from '@sentry/core';\nimport { getClient, _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer } from '@sentry/core';\n\nimport { WINDOW } from './helpers';\n\n/**\n * TODO: Make this configurable\n */\nconst DEFAULT_FLUSH_INTERVAL = 5000;\n\nlet timeout: ReturnType<typeof setTimeout> | undefined;\n\n/**\n * This is a global timeout that is used to flush the logs buffer.\n * It is used to ensure that logs are flushed even if the client is not flushed.\n */\nfunction startFlushTimeout(client: Client): void {\n if (timeout) {\n clearTimeout(timeout);\n }\n\n timeout = setTimeout(() => {\n _INTERNAL_flushLogsBuffer(client);\n }, DEFAULT_FLUSH_INTERVAL);\n}\n\nlet isClientListenerAdded = false;\n/**\n * This is a function that is used to add a flush listener to the client.\n * It is used to ensure that the logger buffer is flushed when the client is flushed.\n */\nfunction addFlushingListeners(client: Client): void {\n if (isClientListenerAdded || !client.getOptions()._experiments?.enableLogs) {\n return;\n }\n\n isClientListenerAdded = true;\n\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n _INTERNAL_flushLogsBuffer(client);\n }\n });\n }\n\n client.on('flush', () => {\n _INTERNAL_flushLogsBuffer(client);\n });\n}\n\n/**\n * Capture a log with the given level.\n *\n * @param level - The level of the log.\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.\n * @param severityNumber - The severity number of the log.\n */\nfunction captureLog(\n level: LogSeverityLevel,\n message: ParameterizedString,\n attributes?: Log['attributes'],\n severityNumber?: Log['severityNumber'],\n): void {\n const client = getClient();\n if (client) {\n addFlushingListeners(client);\n\n startFlushTimeout(client);\n }\n\n _INTERNAL_captureLog({ level, message, attributes, severityNumber }, client, undefined);\n}\n\n/**\n * @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.trace('User clicked submit button', {\n * buttonId: 'submit-form',\n * formId: 'user-profile',\n * timestamp: Date.now()\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {\n * userId: '123',\n * sessionId: 'abc-xyz'\n * });\n * ```\n */\nexport function trace(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('trace', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.debug('Component mounted', {\n * component: 'UserProfile',\n * props: { userId: 123 },\n * renderTime: 150\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {\n * statusCode: 404,\n * requestId: 'req-123',\n * duration: 250\n * });\n * ```\n */\nexport function debug(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('debug', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.info('User completed checkout', {\n * orderId: 'order-123',\n * amount: 99.99,\n * paymentMethod: 'credit_card'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {\n * userId: 'user-123',\n * imageSize: '2.5MB',\n * timestamp: Date.now()\n * });\n * ```\n */\nexport function info(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('info', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.warn('Browser compatibility issue detected', {\n * browser: 'Safari',\n * version: '14.0',\n * feature: 'WebRTC',\n * fallback: 'enabled'\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {\n * recommendedEndpoint: '/api/v2/users',\n * sunsetDate: '2024-12-31',\n * clientVersion: '1.2.3'\n * });\n * ```\n */\nexport function warn(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('warn', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.error('Failed to load user data', {\n * error: 'NetworkError',\n * url: '/api/users/123',\n * statusCode: 500,\n * retryCount: 3\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {\n * error: 'InsufficientFunds',\n * amount: 100.00,\n * currency: 'USD',\n * userId: 'user-456'\n * });\n * ```\n */\nexport function error(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('error', message, attributes);\n}\n\n/**\n * @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.\n *\n * @param message - The message to log.\n * @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.\n *\n * @example\n *\n * ```\n * Sentry.logger.fatal('Application state corrupted', {\n * lastKnownState: 'authenticated',\n * sessionId: 'session-123',\n * timestamp: Date.now(),\n * recoveryAttempted: true\n * });\n * ```\n *\n * @example With template strings\n *\n * ```\n * Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {\n * service: 'payment-processor',\n * errorCode: 'CRITICAL_FAILURE',\n * affectedUsers: 150,\n * timestamp: Date.now()\n * });\n * ```\n */\nexport function fatal(message: ParameterizedString, attributes?: Log['attributes']): void {\n captureLog('fatal', message, attributes);\n}\n\nexport { fmt } from '@sentry/core';\n"],"names":[],"mappings":";;;;AAKA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI;;AAEnC,IAAI,OAAO;;AAEX;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,MAAM,EAAgB;AACjD,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,YAAY,CAAC,OAAO,CAAC;AACzB;;AAEA,EAAE,UAAU,UAAU,CAAC,MAAM;AAC7B,IAAI,yBAAyB,CAAC,MAAM,CAAC;AACrC,GAAG,EAAE,sBAAsB,CAAC;AAC5B;;AAEA,IAAI,qBAAA,GAAwB,KAAK;AACjC;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,MAAM,EAAgB;AACpD,EAAE,IAAI,qBAAsB,IAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE;AAC9E,IAAI;AACJ;;AAEA,EAAE,qBAAA,GAAwB,IAAI;;AA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,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuB,UAAU,EAA4B;AACzF,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuB,UAAU,EAA4B;AACzF,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAuB,UAAU,EAA4B;AAC1F,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,KAAK,CAAC,OAAO,EAAuB,UAAU,EAA4B;AAC1F,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC;AAC1C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"9.
|
|
1
|
+
{"type":"module","version":"9.10.1","sideEffects":false}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function to diagnose why the SDK might not be successfully sending data.
|
|
3
|
+
*
|
|
4
|
+
* Possible return values wrapped in a Promise:
|
|
5
|
+
* - `"no-client-active"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
|
|
6
|
+
* - `"sentry-unreachable"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
|
|
7
|
+
*
|
|
8
|
+
* If the function doesn't detect an issue it resolves to `undefined`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function diagnoseSdkConnectivity(): Promise<'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void>;
|
|
11
|
+
//# sourceMappingURL=diagnose-sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnose-sdk.d.ts","sourceRoot":"","sources":["../../../src/diagnose-sdk.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CACtD,kBAAkB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,IAAI,CACvE,CA2BA"}
|
|
@@ -27,4 +27,5 @@ export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './int
|
|
|
27
27
|
export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
|
|
28
28
|
export { unleashIntegration } from './integrations/featureFlags/unleash';
|
|
29
29
|
export { statsigIntegration } from './integrations/featureFlags/statsig';
|
|
30
|
+
export { diagnoseSdkConnectivity } from './diagnose-sdk';
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,KAAK,MAAM,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,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BAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/build/npm/types/log.d.ts
CHANGED
|
@@ -1,93 +1,169 @@
|
|
|
1
|
-
import type { Log } from '@sentry/core';
|
|
1
|
+
import type { Log, ParameterizedString } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
3
|
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
4
4
|
*
|
|
5
5
|
* @param message - The message to log.
|
|
6
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
6
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
*
|
|
10
10
|
* ```
|
|
11
|
-
* Sentry.logger.trace('
|
|
11
|
+
* Sentry.logger.trace('User clicked submit button', {
|
|
12
|
+
* buttonId: 'submit-form',
|
|
13
|
+
* formId: 'user-profile',
|
|
14
|
+
* timestamp: Date.now()
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example With template strings
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {
|
|
22
|
+
* userId: '123',
|
|
23
|
+
* sessionId: 'abc-xyz'
|
|
24
|
+
* });
|
|
12
25
|
* ```
|
|
13
26
|
*/
|
|
14
|
-
export declare function trace(message:
|
|
27
|
+
export declare function trace(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
15
28
|
/**
|
|
16
29
|
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
17
30
|
*
|
|
18
31
|
* @param message - The message to log.
|
|
19
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
32
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.
|
|
20
33
|
*
|
|
21
34
|
* @example
|
|
22
35
|
*
|
|
23
36
|
* ```
|
|
24
|
-
* Sentry.logger.debug('
|
|
37
|
+
* Sentry.logger.debug('Component mounted', {
|
|
38
|
+
* component: 'UserProfile',
|
|
39
|
+
* props: { userId: 123 },
|
|
40
|
+
* renderTime: 150
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example With template strings
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
* Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {
|
|
48
|
+
* statusCode: 404,
|
|
49
|
+
* requestId: 'req-123',
|
|
50
|
+
* duration: 250
|
|
51
|
+
* });
|
|
25
52
|
* ```
|
|
26
53
|
*/
|
|
27
|
-
export declare function debug(message:
|
|
54
|
+
export declare function debug(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
28
55
|
/**
|
|
29
56
|
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
30
57
|
*
|
|
31
58
|
* @param message - The message to log.
|
|
32
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
59
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.
|
|
33
60
|
*
|
|
34
61
|
* @example
|
|
35
62
|
*
|
|
36
63
|
* ```
|
|
37
|
-
* Sentry.logger.info('
|
|
64
|
+
* Sentry.logger.info('User completed checkout', {
|
|
65
|
+
* orderId: 'order-123',
|
|
66
|
+
* amount: 99.99,
|
|
67
|
+
* paymentMethod: 'credit_card'
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example With template strings
|
|
72
|
+
*
|
|
73
|
+
* ```
|
|
74
|
+
* Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {
|
|
75
|
+
* userId: 'user-123',
|
|
76
|
+
* imageSize: '2.5MB',
|
|
77
|
+
* timestamp: Date.now()
|
|
78
|
+
* });
|
|
38
79
|
* ```
|
|
39
80
|
*/
|
|
40
|
-
export declare function info(message:
|
|
81
|
+
export declare function info(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
41
82
|
/**
|
|
42
83
|
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
43
84
|
*
|
|
44
85
|
* @param message - The message to log.
|
|
45
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
86
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.
|
|
46
87
|
*
|
|
47
88
|
* @example
|
|
48
89
|
*
|
|
49
90
|
* ```
|
|
50
|
-
* Sentry.logger.warn('
|
|
91
|
+
* Sentry.logger.warn('Browser compatibility issue detected', {
|
|
92
|
+
* browser: 'Safari',
|
|
93
|
+
* version: '14.0',
|
|
94
|
+
* feature: 'WebRTC',
|
|
95
|
+
* fallback: 'enabled'
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @example With template strings
|
|
100
|
+
*
|
|
101
|
+
* ```
|
|
102
|
+
* Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {
|
|
103
|
+
* recommendedEndpoint: '/api/v2/users',
|
|
104
|
+
* sunsetDate: '2024-12-31',
|
|
105
|
+
* clientVersion: '1.2.3'
|
|
106
|
+
* });
|
|
51
107
|
* ```
|
|
52
108
|
*/
|
|
53
|
-
export declare function warn(message:
|
|
109
|
+
export declare function warn(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
54
110
|
/**
|
|
55
111
|
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
56
112
|
*
|
|
57
113
|
* @param message - The message to log.
|
|
58
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
114
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.
|
|
59
115
|
*
|
|
60
116
|
* @example
|
|
61
117
|
*
|
|
62
118
|
* ```
|
|
63
|
-
* Sentry.logger.error('
|
|
119
|
+
* Sentry.logger.error('Failed to load user data', {
|
|
120
|
+
* error: 'NetworkError',
|
|
121
|
+
* url: '/api/users/123',
|
|
122
|
+
* statusCode: 500,
|
|
123
|
+
* retryCount: 3
|
|
124
|
+
* });
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @example With template strings
|
|
128
|
+
*
|
|
129
|
+
* ```
|
|
130
|
+
* Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {
|
|
131
|
+
* error: 'InsufficientFunds',
|
|
132
|
+
* amount: 100.00,
|
|
133
|
+
* currency: 'USD',
|
|
134
|
+
* userId: 'user-456'
|
|
135
|
+
* });
|
|
64
136
|
* ```
|
|
65
137
|
*/
|
|
66
|
-
export declare function error(message:
|
|
138
|
+
export declare function error(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
67
139
|
/**
|
|
68
140
|
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
69
141
|
*
|
|
70
142
|
* @param message - The message to log.
|
|
71
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
143
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.
|
|
72
144
|
*
|
|
73
145
|
* @example
|
|
74
146
|
*
|
|
75
147
|
* ```
|
|
76
|
-
* Sentry.logger.fatal('
|
|
148
|
+
* Sentry.logger.fatal('Application state corrupted', {
|
|
149
|
+
* lastKnownState: 'authenticated',
|
|
150
|
+
* sessionId: 'session-123',
|
|
151
|
+
* timestamp: Date.now(),
|
|
152
|
+
* recoveryAttempted: true
|
|
153
|
+
* });
|
|
77
154
|
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare function fatal(message: string, attributes?: Log['attributes']): void;
|
|
80
|
-
/**
|
|
81
|
-
* @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.
|
|
82
155
|
*
|
|
83
|
-
* @
|
|
84
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
156
|
+
* @example With template strings
|
|
87
157
|
*
|
|
88
158
|
* ```
|
|
89
|
-
* Sentry.logger.
|
|
159
|
+
* Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {
|
|
160
|
+
* service: 'payment-processor',
|
|
161
|
+
* errorCode: 'CRITICAL_FAILURE',
|
|
162
|
+
* affectedUsers: 150,
|
|
163
|
+
* timestamp: Date.now()
|
|
164
|
+
* });
|
|
90
165
|
* ```
|
|
91
166
|
*/
|
|
92
|
-
export declare function
|
|
167
|
+
export declare function fatal(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
168
|
+
export { fmt } from '@sentry/core';
|
|
93
169
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,GAAG,EAAU,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,GAAG,EAAU,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA2EvF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAEvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAEvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function to diagnose why the SDK might not be successfully sending data.
|
|
3
|
+
*
|
|
4
|
+
* Possible return values wrapped in a Promise:
|
|
5
|
+
* - `"no-client-active"` - There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
|
|
6
|
+
* - `"sentry-unreachable"` - The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
|
|
7
|
+
*
|
|
8
|
+
* If the function doesn't detect an issue it resolves to `undefined`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function diagnoseSdkConnectivity(): Promise<'no-client-active' | 'sentry-unreachable' | 'no-dsn-configured' | void>;
|
|
11
|
+
//# sourceMappingURL=diagnose-sdk.d.ts.map
|
|
@@ -27,4 +27,5 @@ export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './int
|
|
|
27
27
|
export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integrations/featureFlags/openfeature';
|
|
28
28
|
export { unleashIntegration } from './integrations/featureFlags/unleash';
|
|
29
29
|
export { statsigIntegration } from './integrations/featureFlags/statsig';
|
|
30
|
+
export { diagnoseSdkConnectivity } from './diagnose-sdk';
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,93 +1,169 @@
|
|
|
1
|
-
import { Log } from '@sentry/core';
|
|
1
|
+
import { Log, ParameterizedString } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
3
|
* @summary Capture a log with the `trace` level. Requires `_experiments.enableLogs` to be enabled.
|
|
4
4
|
*
|
|
5
5
|
* @param message - The message to log.
|
|
6
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
6
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
*
|
|
10
10
|
* ```
|
|
11
|
-
* Sentry.logger.trace('
|
|
11
|
+
* Sentry.logger.trace('User clicked submit button', {
|
|
12
|
+
* buttonId: 'submit-form',
|
|
13
|
+
* formId: 'user-profile',
|
|
14
|
+
* timestamp: Date.now()
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example With template strings
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* Sentry.logger.trace(Sentry.logger.fmt`User ${user} navigated to ${page}`, {
|
|
22
|
+
* userId: '123',
|
|
23
|
+
* sessionId: 'abc-xyz'
|
|
24
|
+
* });
|
|
12
25
|
* ```
|
|
13
26
|
*/
|
|
14
|
-
export declare function trace(message:
|
|
27
|
+
export declare function trace(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
15
28
|
/**
|
|
16
29
|
* @summary Capture a log with the `debug` level. Requires `_experiments.enableLogs` to be enabled.
|
|
17
30
|
*
|
|
18
31
|
* @param message - The message to log.
|
|
19
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
32
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.
|
|
20
33
|
*
|
|
21
34
|
* @example
|
|
22
35
|
*
|
|
23
36
|
* ```
|
|
24
|
-
* Sentry.logger.debug('
|
|
37
|
+
* Sentry.logger.debug('Component mounted', {
|
|
38
|
+
* component: 'UserProfile',
|
|
39
|
+
* props: { userId: 123 },
|
|
40
|
+
* renderTime: 150
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example With template strings
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
* Sentry.logger.debug(Sentry.logger.fmt`API request to ${endpoint} failed`, {
|
|
48
|
+
* statusCode: 404,
|
|
49
|
+
* requestId: 'req-123',
|
|
50
|
+
* duration: 250
|
|
51
|
+
* });
|
|
25
52
|
* ```
|
|
26
53
|
*/
|
|
27
|
-
export declare function debug(message:
|
|
54
|
+
export declare function debug(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
28
55
|
/**
|
|
29
56
|
* @summary Capture a log with the `info` level. Requires `_experiments.enableLogs` to be enabled.
|
|
30
57
|
*
|
|
31
58
|
* @param message - The message to log.
|
|
32
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
59
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.
|
|
33
60
|
*
|
|
34
61
|
* @example
|
|
35
62
|
*
|
|
36
63
|
* ```
|
|
37
|
-
* Sentry.logger.info('
|
|
64
|
+
* Sentry.logger.info('User completed checkout', {
|
|
65
|
+
* orderId: 'order-123',
|
|
66
|
+
* amount: 99.99,
|
|
67
|
+
* paymentMethod: 'credit_card'
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example With template strings
|
|
72
|
+
*
|
|
73
|
+
* ```
|
|
74
|
+
* Sentry.logger.info(Sentry.logger.fmt`User ${user} updated profile picture`, {
|
|
75
|
+
* userId: 'user-123',
|
|
76
|
+
* imageSize: '2.5MB',
|
|
77
|
+
* timestamp: Date.now()
|
|
78
|
+
* });
|
|
38
79
|
* ```
|
|
39
80
|
*/
|
|
40
|
-
export declare function info(message:
|
|
81
|
+
export declare function info(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
41
82
|
/**
|
|
42
83
|
* @summary Capture a log with the `warn` level. Requires `_experiments.enableLogs` to be enabled.
|
|
43
84
|
*
|
|
44
85
|
* @param message - The message to log.
|
|
45
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
86
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.
|
|
46
87
|
*
|
|
47
88
|
* @example
|
|
48
89
|
*
|
|
49
90
|
* ```
|
|
50
|
-
* Sentry.logger.warn('
|
|
91
|
+
* Sentry.logger.warn('Browser compatibility issue detected', {
|
|
92
|
+
* browser: 'Safari',
|
|
93
|
+
* version: '14.0',
|
|
94
|
+
* feature: 'WebRTC',
|
|
95
|
+
* fallback: 'enabled'
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @example With template strings
|
|
100
|
+
*
|
|
101
|
+
* ```
|
|
102
|
+
* Sentry.logger.warn(Sentry.logger.fmt`API endpoint ${endpoint} is deprecated`, {
|
|
103
|
+
* recommendedEndpoint: '/api/v2/users',
|
|
104
|
+
* sunsetDate: '2024-12-31',
|
|
105
|
+
* clientVersion: '1.2.3'
|
|
106
|
+
* });
|
|
51
107
|
* ```
|
|
52
108
|
*/
|
|
53
|
-
export declare function warn(message:
|
|
109
|
+
export declare function warn(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
54
110
|
/**
|
|
55
111
|
* @summary Capture a log with the `error` level. Requires `_experiments.enableLogs` to be enabled.
|
|
56
112
|
*
|
|
57
113
|
* @param message - The message to log.
|
|
58
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
114
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.
|
|
59
115
|
*
|
|
60
116
|
* @example
|
|
61
117
|
*
|
|
62
118
|
* ```
|
|
63
|
-
* Sentry.logger.error('
|
|
119
|
+
* Sentry.logger.error('Failed to load user data', {
|
|
120
|
+
* error: 'NetworkError',
|
|
121
|
+
* url: '/api/users/123',
|
|
122
|
+
* statusCode: 500,
|
|
123
|
+
* retryCount: 3
|
|
124
|
+
* });
|
|
125
|
+
* ```
|
|
126
|
+
*
|
|
127
|
+
* @example With template strings
|
|
128
|
+
*
|
|
129
|
+
* ```
|
|
130
|
+
* Sentry.logger.error(Sentry.logger.fmt`Payment processing failed for order ${orderId}`, {
|
|
131
|
+
* error: 'InsufficientFunds',
|
|
132
|
+
* amount: 100.00,
|
|
133
|
+
* currency: 'USD',
|
|
134
|
+
* userId: 'user-456'
|
|
135
|
+
* });
|
|
64
136
|
* ```
|
|
65
137
|
*/
|
|
66
|
-
export declare function error(message:
|
|
138
|
+
export declare function error(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
67
139
|
/**
|
|
68
140
|
* @summary Capture a log with the `fatal` level. Requires `_experiments.enableLogs` to be enabled.
|
|
69
141
|
*
|
|
70
142
|
* @param message - The message to log.
|
|
71
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g.,
|
|
143
|
+
* @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.
|
|
72
144
|
*
|
|
73
145
|
* @example
|
|
74
146
|
*
|
|
75
147
|
* ```
|
|
76
|
-
* Sentry.logger.fatal('
|
|
148
|
+
* Sentry.logger.fatal('Application state corrupted', {
|
|
149
|
+
* lastKnownState: 'authenticated',
|
|
150
|
+
* sessionId: 'session-123',
|
|
151
|
+
* timestamp: Date.now(),
|
|
152
|
+
* recoveryAttempted: true
|
|
153
|
+
* });
|
|
77
154
|
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare function fatal(message: string, attributes?: Log['attributes']): void;
|
|
80
|
-
/**
|
|
81
|
-
* @summary Capture a log with the `critical` level. Requires `_experiments.enableLogs` to be enabled.
|
|
82
155
|
*
|
|
83
|
-
* @
|
|
84
|
-
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
156
|
+
* @example With template strings
|
|
87
157
|
*
|
|
88
158
|
* ```
|
|
89
|
-
* Sentry.logger.
|
|
159
|
+
* Sentry.logger.fatal(Sentry.logger.fmt`Critical system failure in ${service}`, {
|
|
160
|
+
* service: 'payment-processor',
|
|
161
|
+
* errorCode: 'CRITICAL_FAILURE',
|
|
162
|
+
* affectedUsers: 150,
|
|
163
|
+
* timestamp: Date.now()
|
|
164
|
+
* });
|
|
90
165
|
* ```
|
|
91
166
|
*/
|
|
92
|
-
export declare function
|
|
167
|
+
export declare function fatal(message: ParameterizedString, attributes?: Log['attributes']): void;
|
|
168
|
+
export { fmt } from '@sentry/core';
|
|
93
169
|
//# sourceMappingURL=log.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.1",
|
|
4
4
|
"description": "Official Sentry SDK for browsers",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sentry-internal/browser-utils": "9.
|
|
43
|
-
"@sentry-internal/feedback": "9.
|
|
44
|
-
"@sentry-internal/replay": "9.
|
|
45
|
-
"@sentry-internal/replay-canvas": "9.
|
|
46
|
-
"@sentry/core": "9.
|
|
42
|
+
"@sentry-internal/browser-utils": "9.10.1",
|
|
43
|
+
"@sentry-internal/feedback": "9.10.1",
|
|
44
|
+
"@sentry-internal/replay": "9.10.1",
|
|
45
|
+
"@sentry-internal/replay-canvas": "9.10.1",
|
|
46
|
+
"@sentry/core": "9.10.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@sentry-internal/integration-shims": "9.
|
|
49
|
+
"@sentry-internal/integration-shims": "9.10.1",
|
|
50
50
|
"fake-indexeddb": "^4.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|