@sentry/browser 10.12.0 → 10.13.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.
Files changed (39) hide show
  1. package/build/npm/cjs/index.js +3 -2
  2. package/build/npm/cjs/index.js.map +1 -1
  3. package/build/npm/cjs/tracing/browserTracingIntegration.js +28 -5
  4. package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
  5. package/build/npm/cjs/tracing/reportPageLoaded.js +18 -0
  6. package/build/npm/cjs/tracing/reportPageLoaded.js.map +1 -0
  7. package/build/npm/esm/index.js +2 -3
  8. package/build/npm/esm/index.js.map +1 -1
  9. package/build/npm/esm/package.json +1 -1
  10. package/build/npm/esm/tracing/browserTracingIntegration.js +28 -5
  11. package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
  12. package/build/npm/esm/tracing/reportPageLoaded.js +16 -0
  13. package/build/npm/esm/tracing/reportPageLoaded.js.map +1 -0
  14. package/build/npm/types/index.bundle.tracing.d.ts +1 -0
  15. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
  16. package/build/npm/types/index.bundle.tracing.replay.d.ts +1 -0
  17. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
  18. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +1 -0
  19. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  20. package/build/npm/types/index.d.ts +2 -3
  21. package/build/npm/types/index.d.ts.map +1 -1
  22. package/build/npm/types/tracing/browserTracingIntegration.d.ts +17 -1
  23. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  24. package/build/npm/types/tracing/reportPageLoaded.d.ts +11 -0
  25. package/build/npm/types/tracing/reportPageLoaded.d.ts.map +1 -0
  26. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +1 -0
  27. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +1 -0
  28. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +1 -0
  29. package/build/npm/types-ts3.8/index.d.ts +2 -3
  30. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +17 -1
  31. package/build/npm/types-ts3.8/tracing/reportPageLoaded.d.ts +11 -0
  32. package/package.json +7 -7
  33. package/build/npm/cjs/log.js +0 -213
  34. package/build/npm/cjs/log.js.map +0 -1
  35. package/build/npm/esm/log.js +0 -206
  36. package/build/npm/esm/log.js.map +0 -1
  37. package/build/npm/types/log.d.ts +0 -169
  38. package/build/npm/types/log.d.ts.map +0 -1
  39. package/build/npm/types-ts3.8/log.d.ts +0 -169
@@ -1,169 +0,0 @@
1
- import { Log, ParameterizedString } from '@sentry/core';
2
- /**
3
- * @summary Capture a log with the `trace` level. Requires the `enableLogs` option to be enabled.
4
- *
5
- * @param message - The message to log.
6
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { userId: 100, route: '/dashboard' }.
7
- *
8
- * @example
9
- *
10
- * ```
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
- * });
25
- * ```
26
- */
27
- export declare function trace(message: ParameterizedString, attributes?: Log['attributes']): void;
28
- /**
29
- * @summary Capture a log with the `debug` level. Requires the `enableLogs` option to be enabled.
30
- *
31
- * @param message - The message to log.
32
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { component: 'Header', state: 'loading' }.
33
- *
34
- * @example
35
- *
36
- * ```
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
- * });
52
- * ```
53
- */
54
- export declare function debug(message: ParameterizedString, attributes?: Log['attributes']): void;
55
- /**
56
- * @summary Capture a log with the `info` level. Requires the `enableLogs` option to be enabled.
57
- *
58
- * @param message - The message to log.
59
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { feature: 'checkout', status: 'completed' }.
60
- *
61
- * @example
62
- *
63
- * ```
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
- * });
79
- * ```
80
- */
81
- export declare function info(message: ParameterizedString, attributes?: Log['attributes']): void;
82
- /**
83
- * @summary Capture a log with the `warn` level. Requires the `enableLogs` option to be enabled.
84
- *
85
- * @param message - The message to log.
86
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { browser: 'Chrome', version: '91.0' }.
87
- *
88
- * @example
89
- *
90
- * ```
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
- * });
107
- * ```
108
- */
109
- export declare function warn(message: ParameterizedString, attributes?: Log['attributes']): void;
110
- /**
111
- * @summary Capture a log with the `error` level. Requires the `enableLogs` option to be enabled.
112
- *
113
- * @param message - The message to log.
114
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { error: 'NetworkError', url: '/api/data' }.
115
- *
116
- * @example
117
- *
118
- * ```
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
- * });
136
- * ```
137
- */
138
- export declare function error(message: ParameterizedString, attributes?: Log['attributes']): void;
139
- /**
140
- * @summary Capture a log with the `fatal` level. Requires the `enableLogs` option to be enabled.
141
- *
142
- * @param message - The message to log.
143
- * @param attributes - Arbitrary structured data that stores information about the log - e.g., { appState: 'corrupted', sessionId: 'abc-123' }.
144
- *
145
- * @example
146
- *
147
- * ```
148
- * Sentry.logger.fatal('Application state corrupted', {
149
- * lastKnownState: 'authenticated',
150
- * sessionId: 'session-123',
151
- * timestamp: Date.now(),
152
- * recoveryAttempted: true
153
- * });
154
- * ```
155
- *
156
- * @example With template strings
157
- *
158
- * ```
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
- * });
165
- * ```
166
- */
167
- export declare function fatal(message: ParameterizedString, attributes?: Log['attributes']): void;
168
- export { fmt } from '@sentry/core';
169
- //# sourceMappingURL=log.d.ts.map