@datadog/mobile-react-native 2.13.1 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/ios/Sources/SdkVersion.swift +1 -1
- package/lib/commonjs/logs/DdLogs.js +17 -13
- package/lib/commonjs/logs/DdLogs.js.map +1 -1
- package/lib/commonjs/rum/DdAttributes.js +7 -1
- package/lib/commonjs/rum/DdAttributes.js.map +1 -1
- package/lib/commonjs/rum/DdRum.js +18 -11
- package/lib/commonjs/rum/DdRum.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js +1 -1
- package/lib/commonjs/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +35 -1
- package/lib/commonjs/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/commonjs/utils/argsUtils.js +6 -0
- package/lib/commonjs/utils/argsUtils.js.map +1 -1
- package/lib/commonjs/utils/errorUtils.js +1 -13
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/logs/DdLogs.js +17 -13
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/rum/DdAttributes.js +7 -1
- package/lib/module/rum/DdAttributes.js.map +1 -1
- package/lib/module/rum/DdRum.js +18 -11
- package/lib/module/rum/DdRum.js.map +1 -1
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +2 -2
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js +35 -1
- package/lib/module/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.js.map +1 -1
- package/lib/module/utils/argsUtils.js +7 -0
- package/lib/module/utils/argsUtils.js.map +1 -1
- package/lib/module/utils/errorUtils.js +0 -11
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/rum/DdAttributes.d.ts +6 -0
- package/lib/typescript/rum/DdAttributes.d.ts.map +1 -1
- package/lib/typescript/rum/DdRum.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/utils/argsUtils.d.ts +6 -0
- package/lib/typescript/utils/argsUtils.d.ts.map +1 -1
- package/lib/typescript/utils/errorUtils.d.ts +0 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/logs/DdLogs.ts +23 -13
- package/src/logs/__tests__/DdLogs.test.ts +64 -8
- package/src/rum/DdAttributes.ts +8 -1
- package/src/rum/DdRum.ts +26 -11
- package/src/rum/__tests__/DdRum.test.ts +16 -2
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +2 -8
- package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts +35 -1
- package/src/utils/argsUtils.ts +6 -0
- package/src/utils/errorUtils.ts +0 -13
- package/src/version.ts +1 -1
- package/src/.tmp/debug_id +0 -1
|
@@ -702,7 +702,15 @@ describe('DdLogs', () => {
|
|
|
702
702
|
|
|
703
703
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
704
704
|
1,
|
|
705
|
-
expect.
|
|
705
|
+
expect.stringContaining('Tracking debug log'),
|
|
706
|
+
SdkVerbosity.DEBUG
|
|
707
|
+
);
|
|
708
|
+
|
|
709
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
710
|
+
2,
|
|
711
|
+
expect.stringContaining(
|
|
712
|
+
'The given context is an array, it will be nested'
|
|
713
|
+
),
|
|
706
714
|
SdkVerbosity.WARN
|
|
707
715
|
);
|
|
708
716
|
|
|
@@ -732,7 +740,13 @@ describe('DdLogs', () => {
|
|
|
732
740
|
|
|
733
741
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
734
742
|
1,
|
|
735
|
-
expect.
|
|
743
|
+
expect.stringContaining('Tracking debug log'),
|
|
744
|
+
SdkVerbosity.DEBUG
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
748
|
+
2,
|
|
749
|
+
expect.stringContaining('Context will be empty.'),
|
|
736
750
|
SdkVerbosity.ERROR
|
|
737
751
|
);
|
|
738
752
|
|
|
@@ -792,7 +806,15 @@ describe('DdLogs', () => {
|
|
|
792
806
|
|
|
793
807
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
794
808
|
1,
|
|
795
|
-
expect.
|
|
809
|
+
expect.stringContaining('Tracking warn log'),
|
|
810
|
+
SdkVerbosity.DEBUG
|
|
811
|
+
);
|
|
812
|
+
|
|
813
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
814
|
+
2,
|
|
815
|
+
expect.stringContaining(
|
|
816
|
+
'The given context is an array, it will be nested'
|
|
817
|
+
),
|
|
796
818
|
SdkVerbosity.WARN
|
|
797
819
|
);
|
|
798
820
|
|
|
@@ -820,7 +842,13 @@ describe('DdLogs', () => {
|
|
|
820
842
|
|
|
821
843
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
822
844
|
1,
|
|
823
|
-
expect.
|
|
845
|
+
expect.stringContaining('Tracking warn log'),
|
|
846
|
+
SdkVerbosity.DEBUG
|
|
847
|
+
);
|
|
848
|
+
|
|
849
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
850
|
+
2,
|
|
851
|
+
expect.stringContaining('Context will be empty.'),
|
|
824
852
|
SdkVerbosity.ERROR
|
|
825
853
|
);
|
|
826
854
|
|
|
@@ -880,7 +908,15 @@ describe('DdLogs', () => {
|
|
|
880
908
|
|
|
881
909
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
882
910
|
1,
|
|
883
|
-
expect.
|
|
911
|
+
expect.stringContaining('Tracking info log'),
|
|
912
|
+
SdkVerbosity.DEBUG
|
|
913
|
+
);
|
|
914
|
+
|
|
915
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
916
|
+
2,
|
|
917
|
+
expect.stringContaining(
|
|
918
|
+
'The given context is an array, it will be nested'
|
|
919
|
+
),
|
|
884
920
|
SdkVerbosity.WARN
|
|
885
921
|
);
|
|
886
922
|
|
|
@@ -908,7 +944,13 @@ describe('DdLogs', () => {
|
|
|
908
944
|
|
|
909
945
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
910
946
|
1,
|
|
911
|
-
expect.
|
|
947
|
+
expect.stringContaining('Tracking info log'),
|
|
948
|
+
SdkVerbosity.DEBUG
|
|
949
|
+
);
|
|
950
|
+
|
|
951
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
952
|
+
2,
|
|
953
|
+
expect.stringContaining('Context will be empty.'),
|
|
912
954
|
SdkVerbosity.ERROR
|
|
913
955
|
);
|
|
914
956
|
|
|
@@ -968,7 +1010,15 @@ describe('DdLogs', () => {
|
|
|
968
1010
|
|
|
969
1011
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
970
1012
|
1,
|
|
971
|
-
expect.
|
|
1013
|
+
expect.stringContaining('Tracking error log'),
|
|
1014
|
+
SdkVerbosity.DEBUG
|
|
1015
|
+
);
|
|
1016
|
+
|
|
1017
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1018
|
+
2,
|
|
1019
|
+
expect.stringContaining(
|
|
1020
|
+
'The given context is an array, it will be nested'
|
|
1021
|
+
),
|
|
972
1022
|
SdkVerbosity.WARN
|
|
973
1023
|
);
|
|
974
1024
|
|
|
@@ -998,7 +1048,13 @@ describe('DdLogs', () => {
|
|
|
998
1048
|
|
|
999
1049
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1000
1050
|
1,
|
|
1001
|
-
expect.
|
|
1051
|
+
expect.stringContaining('Tracking error log'),
|
|
1052
|
+
SdkVerbosity.DEBUG
|
|
1053
|
+
);
|
|
1054
|
+
|
|
1055
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1056
|
+
2,
|
|
1057
|
+
expect.stringContaining('Context will be empty.'),
|
|
1002
1058
|
SdkVerbosity.ERROR
|
|
1003
1059
|
);
|
|
1004
1060
|
|
package/src/rum/DdAttributes.ts
CHANGED
|
@@ -16,5 +16,12 @@ export const DdAttributes = {
|
|
|
16
16
|
* Custom fingerprint to an error.
|
|
17
17
|
* Expects {@link String} value.
|
|
18
18
|
*/
|
|
19
|
-
errorFingerprint: '_dd.error.fingerprint'
|
|
19
|
+
errorFingerprint: '_dd.error.fingerprint',
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Debug ID attached to a log or a RUM event.
|
|
23
|
+
* The Debug ID establishes a unique connection between a bundle and its corresponding sourcemap.
|
|
24
|
+
* Expects {@link String} value.
|
|
25
|
+
*/
|
|
26
|
+
debugId: '_dd.debug_id'
|
|
20
27
|
};
|
package/src/rum/DdRum.ts
CHANGED
|
@@ -7,12 +7,12 @@ import type { GestureResponderEvent } from 'react-native';
|
|
|
7
7
|
|
|
8
8
|
import { InternalLog } from '../InternalLog';
|
|
9
9
|
import { SdkVerbosity } from '../SdkVerbosity';
|
|
10
|
+
import { debugId } from '../metro/debugIdResolver';
|
|
10
11
|
import type { DdNativeRumType } from '../nativeModulesTypes';
|
|
11
12
|
import { bufferVoidNativeCall } from '../sdk/DatadogProvider/Buffer/bufferNativeCall';
|
|
12
13
|
import { DdSdk } from '../sdk/DdSdk';
|
|
13
14
|
import { GlobalState } from '../sdk/GlobalState/GlobalState';
|
|
14
15
|
import { validateContext } from '../utils/argsUtils';
|
|
15
|
-
import { getErrorContext } from '../utils/errorUtils';
|
|
16
16
|
import { DefaultTimeProvider } from '../utils/time-provider/DefaultTimeProvider';
|
|
17
17
|
import type { TimeProvider } from '../utils/time-provider/TimeProvider';
|
|
18
18
|
|
|
@@ -141,13 +141,16 @@ class DdRumWrapper implements DdRumType {
|
|
|
141
141
|
const mappedEvent = this.actionEventMapper.applyEventMapper({
|
|
142
142
|
type,
|
|
143
143
|
name,
|
|
144
|
-
context
|
|
144
|
+
context,
|
|
145
145
|
timestampMs,
|
|
146
146
|
actionContext
|
|
147
147
|
});
|
|
148
148
|
if (!mappedEvent) {
|
|
149
149
|
return generateEmptyPromise();
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
const validatedContext = validateContext(mappedEvent.context);
|
|
153
|
+
|
|
151
154
|
InternalLog.log(
|
|
152
155
|
`Adding RUM Action “${name}” (${type})`,
|
|
153
156
|
SdkVerbosity.DEBUG
|
|
@@ -156,7 +159,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
156
159
|
this.nativeRum.addAction(
|
|
157
160
|
mappedEvent.type,
|
|
158
161
|
mappedEvent.name,
|
|
159
|
-
|
|
162
|
+
validatedContext,
|
|
160
163
|
mappedEvent.timestampMs
|
|
161
164
|
)
|
|
162
165
|
);
|
|
@@ -199,7 +202,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
199
202
|
statusCode,
|
|
200
203
|
kind,
|
|
201
204
|
size,
|
|
202
|
-
context
|
|
205
|
+
context,
|
|
203
206
|
timestampMs,
|
|
204
207
|
resourceContext
|
|
205
208
|
});
|
|
@@ -223,6 +226,8 @@ class DdRumWrapper implements DdRumType {
|
|
|
223
226
|
);
|
|
224
227
|
}
|
|
225
228
|
|
|
229
|
+
const validatedContext = validateContext(mappedEvent.context);
|
|
230
|
+
|
|
226
231
|
InternalLog.log(
|
|
227
232
|
`Stopping RUM Resource #${key} status:${statusCode}`,
|
|
228
233
|
SdkVerbosity.DEBUG
|
|
@@ -233,7 +238,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
233
238
|
mappedEvent.statusCode,
|
|
234
239
|
mappedEvent.kind,
|
|
235
240
|
mappedEvent.size,
|
|
236
|
-
|
|
241
|
+
validatedContext,
|
|
237
242
|
mappedEvent.timestampMs
|
|
238
243
|
)
|
|
239
244
|
);
|
|
@@ -251,7 +256,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
251
256
|
message,
|
|
252
257
|
source,
|
|
253
258
|
stacktrace,
|
|
254
|
-
context
|
|
259
|
+
context,
|
|
255
260
|
timestampMs,
|
|
256
261
|
fingerprint: fingerprint ?? ''
|
|
257
262
|
});
|
|
@@ -260,8 +265,16 @@ class DdRumWrapper implements DdRumType {
|
|
|
260
265
|
return generateEmptyPromise();
|
|
261
266
|
}
|
|
262
267
|
InternalLog.log(`Adding RUM Error “${message}”`, SdkVerbosity.DEBUG);
|
|
263
|
-
|
|
268
|
+
|
|
269
|
+
const updatedContext: any = validateContext(mappedEvent.context);
|
|
270
|
+
|
|
264
271
|
updatedContext[DdAttributes.errorSourceType] = 'react-native';
|
|
272
|
+
|
|
273
|
+
const _debugId = debugId;
|
|
274
|
+
if (_debugId) {
|
|
275
|
+
updatedContext[DdAttributes.debugId] = _debugId;
|
|
276
|
+
}
|
|
277
|
+
|
|
265
278
|
return bufferVoidNativeCall(() =>
|
|
266
279
|
this.nativeRum.addError(
|
|
267
280
|
mappedEvent.message,
|
|
@@ -393,7 +406,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
393
406
|
const mappedEvent = this.actionEventMapper.applyEventMapper({
|
|
394
407
|
type,
|
|
395
408
|
name,
|
|
396
|
-
context
|
|
409
|
+
context,
|
|
397
410
|
timestampMs
|
|
398
411
|
});
|
|
399
412
|
if (!mappedEvent) {
|
|
@@ -409,11 +422,13 @@ class DdRumWrapper implements DdRumType {
|
|
|
409
422
|
);
|
|
410
423
|
}
|
|
411
424
|
|
|
425
|
+
const validatedContext = validateContext(mappedEvent.context);
|
|
426
|
+
|
|
412
427
|
return bufferVoidNativeCall(() =>
|
|
413
428
|
this.nativeRum.stopAction(
|
|
414
429
|
mappedEvent.type,
|
|
415
430
|
mappedEvent.name,
|
|
416
|
-
|
|
431
|
+
validatedContext,
|
|
417
432
|
mappedEvent.timestampMs
|
|
418
433
|
)
|
|
419
434
|
);
|
|
@@ -440,7 +455,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
440
455
|
return [
|
|
441
456
|
args[0],
|
|
442
457
|
args[1],
|
|
443
|
-
|
|
458
|
+
args[2] || {},
|
|
444
459
|
args[3] || this.timeProvider.now()
|
|
445
460
|
];
|
|
446
461
|
}
|
|
@@ -453,7 +468,7 @@ class DdRumWrapper implements DdRumType {
|
|
|
453
468
|
return [
|
|
454
469
|
type,
|
|
455
470
|
name,
|
|
456
|
-
|
|
471
|
+
args[0] || {},
|
|
457
472
|
args[1] || this.timeProvider.now()
|
|
458
473
|
];
|
|
459
474
|
}
|
|
@@ -1181,7 +1181,13 @@ describe('DdRum', () => {
|
|
|
1181
1181
|
|
|
1182
1182
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1183
1183
|
1,
|
|
1184
|
-
expect.
|
|
1184
|
+
expect.stringContaining('Adding RUM Error'),
|
|
1185
|
+
SdkVerbosity.DEBUG
|
|
1186
|
+
);
|
|
1187
|
+
|
|
1188
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1189
|
+
2,
|
|
1190
|
+
expect.stringContaining('Context will be empty'),
|
|
1185
1191
|
SdkVerbosity.ERROR
|
|
1186
1192
|
);
|
|
1187
1193
|
|
|
@@ -1208,7 +1214,15 @@ describe('DdRum', () => {
|
|
|
1208
1214
|
|
|
1209
1215
|
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1210
1216
|
1,
|
|
1211
|
-
expect.
|
|
1217
|
+
expect.stringContaining('Adding RUM Error'),
|
|
1218
|
+
SdkVerbosity.DEBUG
|
|
1219
|
+
);
|
|
1220
|
+
|
|
1221
|
+
expect(InternalLog.log).toHaveBeenNthCalledWith(
|
|
1222
|
+
2,
|
|
1223
|
+
expect.stringContaining(
|
|
1224
|
+
'The given context is an array, it will be nested'
|
|
1225
|
+
),
|
|
1212
1226
|
SdkVerbosity.WARN
|
|
1213
1227
|
);
|
|
1214
1228
|
|
|
@@ -14,8 +14,7 @@ import {
|
|
|
14
14
|
getErrorStackTrace,
|
|
15
15
|
EMPTY_STACK_TRACE,
|
|
16
16
|
getErrorName,
|
|
17
|
-
DEFAULT_ERROR_NAME
|
|
18
|
-
getErrorContext
|
|
17
|
+
DEFAULT_ERROR_NAME
|
|
19
18
|
} from '../../utils/errorUtils';
|
|
20
19
|
import { executeWithDelay } from '../../utils/jsUtils';
|
|
21
20
|
import { DdRum } from '../DdRum';
|
|
@@ -146,12 +145,7 @@ export class DdRumErrorTracking {
|
|
|
146
145
|
context: object = {}
|
|
147
146
|
): Promise<[void, void]> => {
|
|
148
147
|
return Promise.all([
|
|
149
|
-
DdRum.addError(
|
|
150
|
-
message,
|
|
151
|
-
source,
|
|
152
|
-
stacktrace,
|
|
153
|
-
getErrorContext(context)
|
|
154
|
-
),
|
|
148
|
+
DdRum.addError(message, source, stacktrace, context),
|
|
155
149
|
DdLogs.error(
|
|
156
150
|
message,
|
|
157
151
|
errorName,
|
package/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/baggageHeaderUtils.ts
CHANGED
|
@@ -110,7 +110,7 @@ export function formatBaggageHeader(entries: Set<string>): string | null {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
const headerValue = formattedParts.join(',');
|
|
113
|
-
const byteLength =
|
|
113
|
+
const byteLength = utf8ByteLength(headerValue);
|
|
114
114
|
|
|
115
115
|
if (byteLength > MAX_BYTES) {
|
|
116
116
|
InternalLog.log(
|
|
@@ -122,6 +122,40 @@ export function formatBaggageHeader(entries: Set<string>): string | null {
|
|
|
122
122
|
return headerValue;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Returns the number of bytes needed to encode a string in UTF-8.
|
|
127
|
+
*
|
|
128
|
+
* Useful as a lightweight alternative to Node.js `Buffer.byteLength()`
|
|
129
|
+
* for older environments that do not support it.
|
|
130
|
+
*
|
|
131
|
+
* @param text - The input string.
|
|
132
|
+
* @returns The UTF-8 byte length of the string.
|
|
133
|
+
*/
|
|
134
|
+
function utf8ByteLength(text: string): number {
|
|
135
|
+
let byteLength = text.length;
|
|
136
|
+
for (let i = text.length - 1; i >= 0; i--) {
|
|
137
|
+
const code = text.charCodeAt(i);
|
|
138
|
+
|
|
139
|
+
// 2-byte characters (U+0080 to U+07FF)
|
|
140
|
+
if (code > 0x7f && code <= 0x7ff) {
|
|
141
|
+
byteLength++;
|
|
142
|
+
}
|
|
143
|
+
// 3-byte characters (U+0800 to U+FFFF)
|
|
144
|
+
else if (code > 0x7ff && code <= 0xffff) {
|
|
145
|
+
byteLength += 2;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Handle surrogate pairs (4-byte characters, e.g. emoji)
|
|
149
|
+
// These characters already count as 2 in the initial length
|
|
150
|
+
// Encountering the low surrogate already accounts for the full 4 bytes
|
|
151
|
+
// (2 from the initial length + 2 for the 3-byte characters logic above)
|
|
152
|
+
if (code >= 0xdc00 && code <= 0xdfff) {
|
|
153
|
+
i--; // prevents double counting the same character by skipping high surrogate
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return byteLength;
|
|
157
|
+
}
|
|
158
|
+
|
|
125
159
|
/**
|
|
126
160
|
* Returns a set of valid baggage header characters.
|
|
127
161
|
*/
|
package/src/utils/argsUtils.ts
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
import { InternalLog } from '../InternalLog';
|
|
9
9
|
import { SdkVerbosity } from '../SdkVerbosity';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Validates the given context before passing it to the native SDKs.
|
|
13
|
+
* @param context the original context
|
|
14
|
+
* @returns the original context if it's a plain object, an object wrapping the context if it's an array,
|
|
15
|
+
* or an empty object if the context is of any other type.
|
|
16
|
+
*/
|
|
11
17
|
export const validateContext = (context: any) => {
|
|
12
18
|
if (!context) {
|
|
13
19
|
return {};
|
package/src/utils/errorUtils.ts
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { debugId } from '../metro/debugIdResolver';
|
|
8
|
-
|
|
9
7
|
export const EMPTY_MESSAGE = 'Unknown Error';
|
|
10
8
|
export const EMPTY_STACK_TRACE = '';
|
|
11
9
|
export const DEFAULT_ERROR_NAME = 'Error';
|
|
@@ -73,14 +71,3 @@ export const getErrorName = (error: unknown): string => {
|
|
|
73
71
|
}
|
|
74
72
|
return DEFAULT_ERROR_NAME;
|
|
75
73
|
};
|
|
76
|
-
|
|
77
|
-
export const getErrorContext = (originalContext: any): Record<string, any> => {
|
|
78
|
-
const _debugId = debugId;
|
|
79
|
-
if (!_debugId) {
|
|
80
|
-
return originalContext;
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
...originalContext,
|
|
84
|
-
'_dd.debug_id': _debugId
|
|
85
|
-
};
|
|
86
|
-
};
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '2.
|
|
2
|
+
export const version = '2.14.0';
|
package/src/.tmp/debug_id
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
expected-debug-id
|