@datadog/mobile-react-native 2.4.3 → 2.4.4
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/DatadogSDKReactNative.podspec +8 -6
- package/android/build.gradle +9 -5
- package/android/gradle.properties +1 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkBridgeExt.kt +12 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfiguration.kt +5 -2
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +5 -2
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkImplementation.kt +15 -1
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkNativeInitialization.kt +5 -0
- package/android/src/main/kotlin/com/datadog/reactnative/DdSdkSynthetics.kt +12 -0
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +19 -0
- package/android/src/oldarch/kotlin/com/datadog/reactnative/DdSdk.kt +19 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkBridgeExtTest.kt +28 -0
- package/android/src/test/kotlin/com/datadog/reactnative/DdSdkTest.kt +17 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/DdSdkConfigurationExt.kt +2 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/MockRumMonitor.kt +4 -0
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/DdSdkConfigurationForgeryFactory.kt +2 -1
- package/android/src/test/kotlin/com/datadog/tools/unit/forge/TelemetryConfigurationEventForgeryFactory.kt +55 -55
- package/datadog-configuration.schema.json +8 -0
- package/ios/Sources/DdSdkConfiguration.swift +5 -1
- package/ios/Sources/DdSdkNativeInitialization.swift +1 -0
- package/ios/Sources/RNDdSdkConfiguration.swift +6 -2
- package/ios/Sources/SdkVersion.swift +1 -1
- package/jest/mock.js +3 -0
- package/lib/commonjs/DdSdkReactNative.js +22 -1
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/DdSdkReactNativeConfiguration.js +22 -0
- package/lib/commonjs/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/commonjs/logs/DdLogs.js +11 -9
- package/lib/commonjs/logs/DdLogs.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/types.js +3 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/DdSdkReactNative.js +22 -1
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/DdSdkReactNativeConfiguration.js +22 -0
- package/lib/module/DdSdkReactNativeConfiguration.js.map +1 -1
- package/lib/module/logs/DdLogs.js +11 -9
- package/lib/module/logs/DdLogs.js.map +1 -1
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js +1 -1
- package/lib/module/rum/instrumentation/DdRumErrorTracking.js.map +1 -1
- package/lib/module/types.js +3 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/DdSdkReactNative.d.ts +7 -0
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +22 -0
- package/lib/typescript/DdSdkReactNativeConfiguration.d.ts.map +1 -1
- package/lib/typescript/logs/DdLogs.d.ts.map +1 -1
- package/lib/typescript/logs/types.d.ts +8 -4
- package/lib/typescript/logs/types.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +8 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +30 -1
- package/src/DdSdkReactNativeConfiguration.tsx +24 -0
- package/src/__tests__/DdSdkReactNative.test.tsx +34 -0
- package/src/__tests__/mock.test.ts +1 -0
- package/src/logs/DdLogs.ts +21 -13
- package/src/logs/__tests__/DdLogs.test.ts +147 -0
- package/src/logs/__tests__/eventMapper.test.ts +37 -0
- package/src/logs/types.ts +8 -4
- package/src/rum/instrumentation/DdRumErrorTracking.tsx +12 -4
- package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +4 -0
- package/src/types.tsx +9 -1
- package/src/version.ts +1 -1
package/src/logs/DdLogs.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { DATADOG_MESSAGE_PREFIX, InternalLog } from '../InternalLog';
|
|
|
8
8
|
import { SdkVerbosity } from '../SdkVerbosity';
|
|
9
9
|
import type { DdNativeLogsType } from '../nativeModulesTypes';
|
|
10
10
|
import { DdAttributes } from '../rum/DdAttributes';
|
|
11
|
+
import type { ErrorSource } from '../rum/types';
|
|
11
12
|
import { validateContext } from '../utils/argsUtils';
|
|
12
13
|
|
|
13
14
|
import { generateEventMapper } from './eventMapper';
|
|
@@ -16,7 +17,8 @@ import type {
|
|
|
16
17
|
LogArguments,
|
|
17
18
|
LogEventMapper,
|
|
18
19
|
LogWithErrorArguments,
|
|
19
|
-
NativeLogWithError
|
|
20
|
+
NativeLogWithError,
|
|
21
|
+
RawLogWithError
|
|
20
22
|
} from './types';
|
|
21
23
|
|
|
22
24
|
const SDK_NOT_INITIALIZED_MESSAGE = 'DD_INTERNAL_LOG_SENT_BEFORE_SDK_INIT';
|
|
@@ -99,7 +101,8 @@ class DdLogsWrapper implements DdLogsType {
|
|
|
99
101
|
args[3],
|
|
100
102
|
validateContext(args[4]),
|
|
101
103
|
'error',
|
|
102
|
-
args[5]
|
|
104
|
+
args[5],
|
|
105
|
+
args[6]
|
|
103
106
|
);
|
|
104
107
|
}
|
|
105
108
|
return this.log(args[0], validateContext(args[1]), 'error');
|
|
@@ -177,26 +180,31 @@ class DdLogsWrapper implements DdLogsType {
|
|
|
177
180
|
stacktrace: string | undefined,
|
|
178
181
|
context: object,
|
|
179
182
|
status: 'debug' | 'info' | 'warn' | 'error',
|
|
180
|
-
fingerprint?: string
|
|
183
|
+
fingerprint?: string,
|
|
184
|
+
source?: ErrorSource
|
|
181
185
|
): Promise<void> => {
|
|
182
|
-
const
|
|
186
|
+
const rawLogEvent: RawLogWithError = {
|
|
183
187
|
message,
|
|
184
188
|
errorKind,
|
|
185
189
|
errorMessage,
|
|
186
190
|
stacktrace,
|
|
187
191
|
context,
|
|
188
192
|
status,
|
|
189
|
-
fingerprint: fingerprint ?? ''
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
fingerprint: fingerprint ?? '',
|
|
194
|
+
source
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const mappedEvent = this.logEventMapper.applyEventMapper(rawLogEvent);
|
|
198
|
+
|
|
199
|
+
if (!mappedEvent) {
|
|
192
200
|
this.printLogDroppedByMapper(message, status);
|
|
193
201
|
return generateEmptyPromise();
|
|
194
202
|
}
|
|
195
203
|
|
|
196
|
-
this.printLogTracked(
|
|
204
|
+
this.printLogTracked(mappedEvent.message, status);
|
|
197
205
|
try {
|
|
198
206
|
const updatedContext = {
|
|
199
|
-
...
|
|
207
|
+
...mappedEvent.context,
|
|
200
208
|
[DdAttributes.errorSourceType]: 'react-native'
|
|
201
209
|
};
|
|
202
210
|
|
|
@@ -205,10 +213,10 @@ class DdLogsWrapper implements DdLogsType {
|
|
|
205
213
|
}
|
|
206
214
|
|
|
207
215
|
return await this.nativeLogs[`${status}WithError`](
|
|
208
|
-
|
|
209
|
-
(
|
|
210
|
-
(
|
|
211
|
-
(
|
|
216
|
+
mappedEvent.message,
|
|
217
|
+
(mappedEvent as NativeLogWithError).errorKind,
|
|
218
|
+
(mappedEvent as NativeLogWithError).errorMessage,
|
|
219
|
+
(mappedEvent as NativeLogWithError).stacktrace,
|
|
212
220
|
updatedContext
|
|
213
221
|
);
|
|
214
222
|
} catch (error) {
|
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
import { NativeModules } from 'react-native';
|
|
8
8
|
|
|
9
|
+
import { DdSdkReactNativeConfiguration } from '../../DdSdkReactNativeConfiguration';
|
|
10
|
+
import { DdSdkReactNative } from '../../DdSdkReactNative';
|
|
9
11
|
import { InternalLog } from '../../InternalLog';
|
|
10
12
|
import { SdkVerbosity } from '../../SdkVerbosity';
|
|
11
13
|
import type { DdNativeLogsType } from '../../nativeModulesTypes';
|
|
14
|
+
import { ErrorSource } from '../../rum/types';
|
|
12
15
|
import { DdLogs } from '../DdLogs';
|
|
13
16
|
import type { LogEventMapper } from '../types';
|
|
14
17
|
|
|
@@ -135,6 +138,150 @@ describe('DdLogs', () => {
|
|
|
135
138
|
'debug'
|
|
136
139
|
);
|
|
137
140
|
});
|
|
141
|
+
|
|
142
|
+
it('log with error events can be filtered by error source', async () => {
|
|
143
|
+
const logEventMapper: LogEventMapper = logEvent => {
|
|
144
|
+
if (logEvent.source === ErrorSource.CONSOLE) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return logEvent;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
DdLogs.registerLogEventMapper(logEventMapper);
|
|
152
|
+
|
|
153
|
+
await DdLogs.error(
|
|
154
|
+
'message',
|
|
155
|
+
'kind',
|
|
156
|
+
'message',
|
|
157
|
+
'stacktrace',
|
|
158
|
+
{},
|
|
159
|
+
'fingerprint',
|
|
160
|
+
ErrorSource.CONSOLE
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
// Call with filtered ErrorSource.CONSOLE type
|
|
164
|
+
expect(NativeModules.DdLogs.error).not.toHaveBeenCalled();
|
|
165
|
+
expect(InternalLog.log).toHaveBeenCalledWith(
|
|
166
|
+
'error log dropped by log mapper: "message"',
|
|
167
|
+
'debug'
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
// Call with valid ErrorSource.CUSTOM type
|
|
171
|
+
await DdLogs.error(
|
|
172
|
+
'message',
|
|
173
|
+
'kind',
|
|
174
|
+
'message',
|
|
175
|
+
'stacktrace',
|
|
176
|
+
{},
|
|
177
|
+
'fingerprint',
|
|
178
|
+
ErrorSource.CUSTOM
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
expect(NativeModules.DdLogs.errorWithError).toHaveBeenCalledWith(
|
|
182
|
+
'message',
|
|
183
|
+
'kind',
|
|
184
|
+
'message',
|
|
185
|
+
'stacktrace',
|
|
186
|
+
{
|
|
187
|
+
'_dd.error.fingerprint': 'fingerprint',
|
|
188
|
+
'_dd.error.source_type': 'react-native'
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
expect(InternalLog.log).toHaveBeenCalledWith(
|
|
192
|
+
'Tracking error log "message"',
|
|
193
|
+
'debug'
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it('console errors can be filtered with mappers when trackErrors=true', async () => {
|
|
198
|
+
// GIVEN
|
|
199
|
+
const fakeAppId = '1';
|
|
200
|
+
const fakeClientToken = '2';
|
|
201
|
+
const fakeEnvName = 'env';
|
|
202
|
+
const configuration = new DdSdkReactNativeConfiguration(
|
|
203
|
+
fakeClientToken,
|
|
204
|
+
fakeEnvName,
|
|
205
|
+
fakeAppId,
|
|
206
|
+
false,
|
|
207
|
+
false,
|
|
208
|
+
true // Track Errors
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
// Register log event mapper to filter console log events
|
|
212
|
+
configuration.logEventMapper = logEvent => {
|
|
213
|
+
if (logEvent.source === ErrorSource.CONSOLE) {
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return logEvent;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
NativeModules.DdSdk.initialize.mockResolvedValue(null);
|
|
221
|
+
|
|
222
|
+
// WHEN
|
|
223
|
+
await DdSdkReactNative.initialize(configuration);
|
|
224
|
+
|
|
225
|
+
console.error('console-error-message');
|
|
226
|
+
expect(NativeModules.DdLogs.error).not.toHaveBeenCalled();
|
|
227
|
+
expect(InternalLog.log).toHaveBeenCalledWith(
|
|
228
|
+
'error log dropped by log mapper: "console-error-message"',
|
|
229
|
+
'debug'
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
// Call with valid ErrorSource.CUSTOM type
|
|
233
|
+
await DdLogs.error(
|
|
234
|
+
'message',
|
|
235
|
+
'kind',
|
|
236
|
+
'message',
|
|
237
|
+
'stacktrace',
|
|
238
|
+
{},
|
|
239
|
+
'fingerprint',
|
|
240
|
+
ErrorSource.CUSTOM
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
expect(NativeModules.DdLogs.errorWithError).toHaveBeenCalledWith(
|
|
244
|
+
'message',
|
|
245
|
+
'kind',
|
|
246
|
+
'message',
|
|
247
|
+
'stacktrace',
|
|
248
|
+
{
|
|
249
|
+
'_dd.error.fingerprint': 'fingerprint',
|
|
250
|
+
'_dd.error.source_type': 'react-native'
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
expect(InternalLog.log).toHaveBeenCalledWith(
|
|
254
|
+
'Tracking error log "message"',
|
|
255
|
+
'debug'
|
|
256
|
+
);
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
it('console errors are reported in logs when trackErrors=true', async () => {
|
|
260
|
+
// GIVEN
|
|
261
|
+
const fakeAppId = '1';
|
|
262
|
+
const fakeClientToken = '2';
|
|
263
|
+
const fakeEnvName = 'env';
|
|
264
|
+
const configuration = new DdSdkReactNativeConfiguration(
|
|
265
|
+
fakeClientToken,
|
|
266
|
+
fakeEnvName,
|
|
267
|
+
fakeAppId,
|
|
268
|
+
false,
|
|
269
|
+
false,
|
|
270
|
+
true // Track Errors
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
NativeModules.DdSdk.initialize.mockResolvedValue(null);
|
|
274
|
+
|
|
275
|
+
// WHEN
|
|
276
|
+
await DdSdkReactNative.initialize(configuration);
|
|
277
|
+
|
|
278
|
+
console.error('console-error-message');
|
|
279
|
+
expect(NativeModules.DdLogs.error).not.toHaveBeenCalled();
|
|
280
|
+
expect(InternalLog.log).toHaveBeenCalledWith(
|
|
281
|
+
'Tracking error log "console-error-message"',
|
|
282
|
+
'debug'
|
|
283
|
+
);
|
|
284
|
+
});
|
|
138
285
|
});
|
|
139
286
|
|
|
140
287
|
describe('log with error', () => {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
8
|
+
import { ErrorSource } from '../../rum/types';
|
|
8
9
|
import { formatRawLogToLogEvent } from '../eventMapper';
|
|
9
10
|
|
|
10
11
|
describe('formatRawLogToLogEvent', () => {
|
|
@@ -84,4 +85,40 @@ describe('formatRawLogToLogEvent', () => {
|
|
|
84
85
|
attributes: { appType: 'student' }
|
|
85
86
|
});
|
|
86
87
|
});
|
|
88
|
+
|
|
89
|
+
it('formats a raw log with error attributes and with context, userInfo, attributes and source to a LogEvent', () => {
|
|
90
|
+
expect(
|
|
91
|
+
formatRawLogToLogEvent(
|
|
92
|
+
{
|
|
93
|
+
message: 'original',
|
|
94
|
+
errorKind: 'TypeError',
|
|
95
|
+
errorMessage: 'something went wrong',
|
|
96
|
+
stacktrace: 'stacktrace',
|
|
97
|
+
context: { loggedIn: true },
|
|
98
|
+
status: 'info',
|
|
99
|
+
source: ErrorSource.CONSOLE
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
userInfo: {
|
|
103
|
+
name: 'userName',
|
|
104
|
+
extraInfo: { loggedIn: true }
|
|
105
|
+
},
|
|
106
|
+
attributes: { appType: 'student' }
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
).toEqual({
|
|
110
|
+
message: 'original',
|
|
111
|
+
errorKind: 'TypeError',
|
|
112
|
+
errorMessage: 'something went wrong',
|
|
113
|
+
stacktrace: 'stacktrace',
|
|
114
|
+
context: { loggedIn: true },
|
|
115
|
+
status: 'info',
|
|
116
|
+
source: ErrorSource.CONSOLE,
|
|
117
|
+
userInfo: {
|
|
118
|
+
name: 'userName',
|
|
119
|
+
extraInfo: { loggedIn: true }
|
|
120
|
+
},
|
|
121
|
+
attributes: { appType: 'student' }
|
|
122
|
+
});
|
|
123
|
+
});
|
|
87
124
|
});
|
package/src/logs/types.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { ErrorSource } from '../rum/types';
|
|
7
8
|
import type { UserInfo } from '../sdk/UserInfoSingleton/types';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -49,12 +50,13 @@ export type RawLog = {
|
|
|
49
50
|
};
|
|
50
51
|
export type RawLogWithError = {
|
|
51
52
|
message: string;
|
|
52
|
-
errorKind
|
|
53
|
-
errorMessage
|
|
54
|
-
stacktrace
|
|
53
|
+
errorKind?: string;
|
|
54
|
+
errorMessage?: string;
|
|
55
|
+
stacktrace?: string;
|
|
55
56
|
context: object;
|
|
56
57
|
status: LogStatus;
|
|
57
58
|
fingerprint?: string;
|
|
59
|
+
source?: ErrorSource;
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
/**
|
|
@@ -82,6 +84,7 @@ export type LogEvent = {
|
|
|
82
84
|
errorMessage?: string;
|
|
83
85
|
stacktrace?: string;
|
|
84
86
|
fingerprint?: string;
|
|
87
|
+
readonly source?: ErrorSource;
|
|
85
88
|
// readonly date: number; // TODO: RUMM-2446 & RUMM-2447
|
|
86
89
|
readonly status: LogStatus;
|
|
87
90
|
readonly userInfo: UserInfo;
|
|
@@ -98,5 +101,6 @@ export type LogWithErrorArguments = [
|
|
|
98
101
|
errorMessage?: string,
|
|
99
102
|
stacktrace?: string,
|
|
100
103
|
context?: object,
|
|
101
|
-
fingerprint?: string
|
|
104
|
+
fingerprint?: string,
|
|
105
|
+
source?: ErrorSource
|
|
102
106
|
];
|
|
@@ -146,10 +146,18 @@ export class DdRumErrorTracking {
|
|
|
146
146
|
): Promise<[void, void]> => {
|
|
147
147
|
return Promise.all([
|
|
148
148
|
DdRum.addError(message, source, stacktrace, context),
|
|
149
|
-
DdLogs.error(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
DdLogs.error(
|
|
150
|
+
message,
|
|
151
|
+
errorName,
|
|
152
|
+
message,
|
|
153
|
+
stacktrace,
|
|
154
|
+
{
|
|
155
|
+
...context,
|
|
156
|
+
'_dd.error_log.is_crash': true
|
|
157
|
+
},
|
|
158
|
+
undefined,
|
|
159
|
+
source
|
|
160
|
+
)
|
|
153
161
|
]);
|
|
154
162
|
};
|
|
155
163
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { version as reactNativeVersion } from 'react-native/package.json';
|
|
7
8
|
import { NativeModules } from 'react-native';
|
|
8
9
|
|
|
9
10
|
import { InitializationMode } from '../../../DdSdkReactNativeConfiguration';
|
|
@@ -64,8 +65,10 @@ describe('DatadogProvider', () => {
|
|
|
64
65
|
expect(receivedConfiguration).toMatchInlineSnapshot(`
|
|
65
66
|
DdSdkConfiguration {
|
|
66
67
|
"additionalConfiguration": {
|
|
68
|
+
"_dd.react_native_version": "${reactNativeVersion}",
|
|
67
69
|
"_dd.source": "react-native",
|
|
68
70
|
},
|
|
71
|
+
"appHangThreshold": undefined,
|
|
69
72
|
"applicationId": "fakeApplicationId",
|
|
70
73
|
"batchSize": "MEDIUM",
|
|
71
74
|
"bundleLogsWithRum": true,
|
|
@@ -94,6 +97,7 @@ describe('DatadogProvider', () => {
|
|
|
94
97
|
"telemetrySampleRate": 20,
|
|
95
98
|
"trackBackgroundEvents": false,
|
|
96
99
|
"trackFrustrations": true,
|
|
100
|
+
"trackNonFatalAnrs": undefined,
|
|
97
101
|
"trackingConsent": "granted",
|
|
98
102
|
"uploadFrequency": "AVERAGE",
|
|
99
103
|
"verbosity": undefined,
|
package/src/types.tsx
CHANGED
|
@@ -56,7 +56,9 @@ export class DdSdkConfiguration {
|
|
|
56
56
|
propagatorTypes: string[];
|
|
57
57
|
}[],
|
|
58
58
|
readonly bundleLogsWithRum: boolean,
|
|
59
|
-
readonly bundleLogsWithTraces: boolean
|
|
59
|
+
readonly bundleLogsWithTraces: boolean,
|
|
60
|
+
readonly trackNonFatalAnrs: boolean | undefined,
|
|
61
|
+
readonly appHangThreshold: number | undefined
|
|
60
62
|
) {}
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -82,6 +84,12 @@ export type DdSdkType = {
|
|
|
82
84
|
*/
|
|
83
85
|
setUser(user: object): Promise<void>;
|
|
84
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Add additional user information.
|
|
89
|
+
* @param extraUserInfo: The extra info object (use builtin attributes: 'id', 'email', 'name', and/or any custom attribute).
|
|
90
|
+
*/
|
|
91
|
+
addUserExtraInfo(extraUserInfo: object): Promise<void>;
|
|
92
|
+
|
|
85
93
|
/**
|
|
86
94
|
* Set the tracking consent regarding the data collection.
|
|
87
95
|
* @param trackingConsent: Consent, which can take one of the following values: 'pending', 'granted', 'not_granted'.
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '2.4.
|
|
2
|
+
export const version = '2.4.4';
|