@microsoft/applicationinsights-react-native 2.5.6 → 3.0.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/README.md +44 -2
- package/browser/applicationinsights-react-native.js +105 -47
- package/browser/applicationinsights-react-native.js.map +1 -1
- package/browser/applicationinsights-react-native.min.js +2 -2
- package/browser/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.api.json +216 -6
- package/dist/applicationinsights-react-native.api.md +12 -5
- package/dist/applicationinsights-react-native.d.ts +70 -1
- package/dist/applicationinsights-react-native.js +105 -47
- package/dist/applicationinsights-react-native.js.map +1 -1
- package/dist/applicationinsights-react-native.min.js +2 -2
- package/dist/applicationinsights-react-native.min.js.map +1 -1
- package/dist/applicationinsights-react-native.rollup.d.ts +70 -1
- package/dist-esm/DeviceInfo/DeviceModule.js +38 -0
- package/dist-esm/DeviceInfo/DeviceModule.js.map +1 -0
- package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js +15 -0
- package/dist-esm/DeviceInfo/ReactNativeDeviceInfo.js.map +1 -0
- package/dist-esm/Interfaces/IDeviceInfoModule.js +8 -0
- package/dist-esm/Interfaces/IDeviceInfoModule.js.map +1 -0
- package/dist-esm/Interfaces/INativeDevice.js +3 -1
- package/dist-esm/Interfaces/INativeDevice.js.map +1 -1
- package/dist-esm/Interfaces/IReactNativePluginConfig.js +1 -1
- package/dist-esm/Interfaces/index.js +3 -1
- package/dist-esm/Interfaces/index.js.map +1 -1
- package/dist-esm/ReactNativePlugin.js +81 -41
- package/dist-esm/ReactNativePlugin.js.map +1 -1
- package/dist-esm/index.js +5 -1
- package/dist-esm/index.js.map +1 -1
- package/package.json +9 -8
- package/src/DeviceInfo/DeviceModule.ts +44 -0
- package/src/DeviceInfo/ReactNativeDeviceInfo.ts +13 -0
- package/src/Interfaces/IDeviceInfoModule.ts +31 -0
- package/src/Interfaces/INativeDevice.ts +3 -0
- package/src/Interfaces/IReactNativePluginConfig.ts +15 -0
- package/src/Interfaces/index.ts +3 -0
- package/src/ReactNativePlugin.ts +109 -41
- package/src/index.ts +8 -2
- package/types/DeviceInfo/DeviceModule.d.ts +10 -0
- package/types/DeviceInfo/ReactNativeDeviceInfo.d.ts +6 -0
- package/types/Interfaces/IDeviceInfoModule.d.ts +25 -0
- package/types/Interfaces/IReactNativePluginConfig.d.ts +11 -0
- package/types/ReactNativePlugin.d.ts +27 -11
- package/types/index.d.ts +4 -1
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.28.
|
|
4
|
+
"toolVersion": "7.28.7",
|
|
5
5
|
"schemaVersion": 1009,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -172,6 +172,141 @@
|
|
|
172
172
|
"name": "",
|
|
173
173
|
"preserveMemberOrder": false,
|
|
174
174
|
"members": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "Function",
|
|
177
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!getReactNativeDeviceInfo:function(1)",
|
|
178
|
+
"docComment": "/**\n * Returns the \"react-native-device-info\" as the Device Info Module\n *\n * @returns \n */\n",
|
|
179
|
+
"excerptTokens": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "Content",
|
|
182
|
+
"text": "export declare function getReactNativeDeviceInfo(): "
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "Reference",
|
|
186
|
+
"text": "IDeviceInfoModule",
|
|
187
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule:interface"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"kind": "Content",
|
|
191
|
+
"text": ";"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"returnTypeTokenRange": {
|
|
195
|
+
"startIndex": 1,
|
|
196
|
+
"endIndex": 2
|
|
197
|
+
},
|
|
198
|
+
"releaseTag": "Public",
|
|
199
|
+
"overloadIndex": 1,
|
|
200
|
+
"parameters": [],
|
|
201
|
+
"name": "getReactNativeDeviceInfo"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"kind": "Interface",
|
|
205
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule:interface",
|
|
206
|
+
"docComment": "/**\n * Interface to abstract how the plugin can access the Device Info, this is a stripped down version of the \"react-native-device-info\" interface and is mostly supplied for testing.\n */\n",
|
|
207
|
+
"excerptTokens": [
|
|
208
|
+
{
|
|
209
|
+
"kind": "Content",
|
|
210
|
+
"text": "export interface IDeviceInfoModule "
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"releaseTag": "Public",
|
|
214
|
+
"name": "IDeviceInfoModule",
|
|
215
|
+
"preserveMemberOrder": false,
|
|
216
|
+
"members": [
|
|
217
|
+
{
|
|
218
|
+
"kind": "PropertySignature",
|
|
219
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule#getDeviceType:member",
|
|
220
|
+
"docComment": "/**\n * Returns the device type\n */\n",
|
|
221
|
+
"excerptTokens": [
|
|
222
|
+
{
|
|
223
|
+
"kind": "Content",
|
|
224
|
+
"text": "getDeviceType: "
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "Content",
|
|
228
|
+
"text": "() => string"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "Content",
|
|
232
|
+
"text": ";"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"isReadonly": false,
|
|
236
|
+
"isOptional": false,
|
|
237
|
+
"releaseTag": "Public",
|
|
238
|
+
"name": "getDeviceType",
|
|
239
|
+
"propertyTypeTokenRange": {
|
|
240
|
+
"startIndex": 1,
|
|
241
|
+
"endIndex": 2
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"kind": "PropertySignature",
|
|
246
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule#getModel:member",
|
|
247
|
+
"docComment": "/**\n * Returns the Device Model\n */\n",
|
|
248
|
+
"excerptTokens": [
|
|
249
|
+
{
|
|
250
|
+
"kind": "Content",
|
|
251
|
+
"text": "getModel: "
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"kind": "Content",
|
|
255
|
+
"text": "() => string"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"kind": "Content",
|
|
259
|
+
"text": ";"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"isReadonly": false,
|
|
263
|
+
"isOptional": false,
|
|
264
|
+
"releaseTag": "Public",
|
|
265
|
+
"name": "getModel",
|
|
266
|
+
"propertyTypeTokenRange": {
|
|
267
|
+
"startIndex": 1,
|
|
268
|
+
"endIndex": 2
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"kind": "PropertySignature",
|
|
273
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule#getUniqueId:member",
|
|
274
|
+
"docComment": "/**\n * Returns the unique Id for the device, to support both the current version and previous versions react-native-device-info, this may return either a `string` or `Promise<string>`, when a promise is returned the plugin will \"wait\" for the promise to `resolve` or `reject` before processing any events. This WILL cause telemetry to be BLOCKED until either of these states, so when returning a Promise it MUST `resolve` or `reject` it can't just never resolve. There is a default timeout configured via `uniqueIdPromiseTimeout` to automatically unblock event processing when this issue occurs.\n */\n",
|
|
275
|
+
"excerptTokens": [
|
|
276
|
+
{
|
|
277
|
+
"kind": "Content",
|
|
278
|
+
"text": "getUniqueId: "
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "Content",
|
|
282
|
+
"text": "() => "
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"kind": "Reference",
|
|
286
|
+
"text": "Promise",
|
|
287
|
+
"canonicalReference": "!Promise:interface"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"kind": "Content",
|
|
291
|
+
"text": "<string> | string"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"kind": "Content",
|
|
295
|
+
"text": ";"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"isReadonly": false,
|
|
299
|
+
"isOptional": false,
|
|
300
|
+
"releaseTag": "Public",
|
|
301
|
+
"name": "getUniqueId",
|
|
302
|
+
"propertyTypeTokenRange": {
|
|
303
|
+
"startIndex": 1,
|
|
304
|
+
"endIndex": 4
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"extendsTokenRanges": []
|
|
309
|
+
},
|
|
175
310
|
{
|
|
176
311
|
"kind": "Interface",
|
|
177
312
|
"canonicalReference": "@microsoft/applicationinsights-react-native!INativeDevice:interface",
|
|
@@ -287,7 +422,7 @@
|
|
|
287
422
|
{
|
|
288
423
|
"kind": "PropertySignature",
|
|
289
424
|
"canonicalReference": "@microsoft/applicationinsights-react-native!IReactNativePluginConfig#disableDeviceCollection:member",
|
|
290
|
-
"docComment": "",
|
|
425
|
+
"docComment": "/**\n * Disable automatic device collection\n */\n",
|
|
291
426
|
"excerptTokens": [
|
|
292
427
|
{
|
|
293
428
|
"kind": "Content",
|
|
@@ -314,7 +449,7 @@
|
|
|
314
449
|
{
|
|
315
450
|
"kind": "PropertySignature",
|
|
316
451
|
"canonicalReference": "@microsoft/applicationinsights-react-native!IReactNativePluginConfig#disableExceptionCollection:member",
|
|
317
|
-
"docComment": "",
|
|
452
|
+
"docComment": "/**\n * Disable automatic exception collection\n */\n",
|
|
318
453
|
"excerptTokens": [
|
|
319
454
|
{
|
|
320
455
|
"kind": "Content",
|
|
@@ -337,6 +472,33 @@
|
|
|
337
472
|
"startIndex": 1,
|
|
338
473
|
"endIndex": 2
|
|
339
474
|
}
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"kind": "PropertySignature",
|
|
478
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IReactNativePluginConfig#uniqueIdPromiseTimeout:member",
|
|
479
|
+
"docComment": "/**\n * Timeout value to unblock the processing of events if the DeviceInfoModule returns a Promise.\n */\n",
|
|
480
|
+
"excerptTokens": [
|
|
481
|
+
{
|
|
482
|
+
"kind": "Content",
|
|
483
|
+
"text": "uniqueIdPromiseTimeout?: "
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"kind": "Content",
|
|
487
|
+
"text": "number"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "Content",
|
|
491
|
+
"text": ";"
|
|
492
|
+
}
|
|
493
|
+
],
|
|
494
|
+
"isReadonly": false,
|
|
495
|
+
"isOptional": true,
|
|
496
|
+
"releaseTag": "Public",
|
|
497
|
+
"name": "uniqueIdPromiseTimeout",
|
|
498
|
+
"propertyTypeTokenRange": {
|
|
499
|
+
"startIndex": 1,
|
|
500
|
+
"endIndex": 2
|
|
501
|
+
}
|
|
340
502
|
}
|
|
341
503
|
],
|
|
342
504
|
"extendsTokenRanges": []
|
|
@@ -643,7 +805,7 @@
|
|
|
643
805
|
{
|
|
644
806
|
"kind": "Method",
|
|
645
807
|
"canonicalReference": "@microsoft/applicationinsights-react-native!ReactNativePlugin#setDeviceId:member(1)",
|
|
646
|
-
"docComment": "",
|
|
808
|
+
"docComment": "/**\n * Manually set the deviceId, if set before initialization and automatic device info collection is enabled this value may get overwritten. If you want to keep this value disable auto collection by setting the `disableDeviceCollection` config to true.\n *\n * @param newId - The value to use as the device Id.\n */\n",
|
|
647
809
|
"excerptTokens": [
|
|
648
810
|
{
|
|
649
811
|
"kind": "Content",
|
|
@@ -687,10 +849,58 @@
|
|
|
687
849
|
"isOptional": false,
|
|
688
850
|
"name": "setDeviceId"
|
|
689
851
|
},
|
|
852
|
+
{
|
|
853
|
+
"kind": "Method",
|
|
854
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!ReactNativePlugin#setDeviceInfoModule:member(1)",
|
|
855
|
+
"docComment": "/**\n * Set the module that will be used during initialization when collecting device is enabled (the default), automatic collection can be disabled via the `disableDeviceCollection` config. The `react-native-device-info` module will be used by default if no `deviceInfoModule` is set and collection is enabled.\n *\n * @param deviceInfoModule - \n */\n",
|
|
856
|
+
"excerptTokens": [
|
|
857
|
+
{
|
|
858
|
+
"kind": "Content",
|
|
859
|
+
"text": "setDeviceInfoModule(deviceInfoModule: "
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"kind": "Reference",
|
|
863
|
+
"text": "IDeviceInfoModule",
|
|
864
|
+
"canonicalReference": "@microsoft/applicationinsights-react-native!IDeviceInfoModule:interface"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"kind": "Content",
|
|
868
|
+
"text": "): "
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"kind": "Content",
|
|
872
|
+
"text": "void"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"kind": "Content",
|
|
876
|
+
"text": ";"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
"isStatic": false,
|
|
880
|
+
"returnTypeTokenRange": {
|
|
881
|
+
"startIndex": 3,
|
|
882
|
+
"endIndex": 4
|
|
883
|
+
},
|
|
884
|
+
"releaseTag": "Public",
|
|
885
|
+
"isProtected": false,
|
|
886
|
+
"overloadIndex": 1,
|
|
887
|
+
"parameters": [
|
|
888
|
+
{
|
|
889
|
+
"parameterName": "deviceInfoModule",
|
|
890
|
+
"parameterTypeTokenRange": {
|
|
891
|
+
"startIndex": 1,
|
|
892
|
+
"endIndex": 2
|
|
893
|
+
},
|
|
894
|
+
"isOptional": false
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
"isOptional": false,
|
|
898
|
+
"name": "setDeviceInfoModule"
|
|
899
|
+
},
|
|
690
900
|
{
|
|
691
901
|
"kind": "Method",
|
|
692
902
|
"canonicalReference": "@microsoft/applicationinsights-react-native!ReactNativePlugin#setDeviceModel:member(1)",
|
|
693
|
-
"docComment": "",
|
|
903
|
+
"docComment": "/**\n * Manually set the device model, if set before initialization and automatic device info collection is enabled this value may get overwritten. If you want to keep this value disable auto collection by setting the `disableDeviceCollection` config to true.\n *\n * @param newModel - The value to use as the device model.\n */\n",
|
|
694
904
|
"excerptTokens": [
|
|
695
905
|
{
|
|
696
906
|
"kind": "Content",
|
|
@@ -737,7 +947,7 @@
|
|
|
737
947
|
{
|
|
738
948
|
"kind": "Method",
|
|
739
949
|
"canonicalReference": "@microsoft/applicationinsights-react-native!ReactNativePlugin#setDeviceType:member(1)",
|
|
740
|
-
"docComment": "",
|
|
950
|
+
"docComment": "/**\n * Manually set the device type (class), if set before initialization and automatic device info collection is enabled this value may get overwritten. If you want to keep this value disable auto collection by setting the `disableDeviceCollection` config to true.\n *\n * @param newType - The value to use as the device type\n */\n",
|
|
741
951
|
"excerptTokens": [
|
|
742
952
|
{
|
|
743
953
|
"kind": "Content",
|
|
@@ -11,6 +11,16 @@ import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js
|
|
|
11
11
|
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
12
12
|
import { ITelemetryPlugin } from '@microsoft/applicationinsights-core-js';
|
|
13
13
|
|
|
14
|
+
// @public
|
|
15
|
+
export function getReactNativeDeviceInfo(): IDeviceInfoModule;
|
|
16
|
+
|
|
17
|
+
// @public
|
|
18
|
+
export interface IDeviceInfoModule {
|
|
19
|
+
getDeviceType: () => string;
|
|
20
|
+
getModel: () => string;
|
|
21
|
+
getUniqueId: () => Promise<string> | string;
|
|
22
|
+
}
|
|
23
|
+
|
|
14
24
|
// @public (undocumented)
|
|
15
25
|
export interface INativeDevice {
|
|
16
26
|
deviceClass?: string;
|
|
@@ -20,10 +30,9 @@ export interface INativeDevice {
|
|
|
20
30
|
|
|
21
31
|
// @public (undocumented)
|
|
22
32
|
export interface IReactNativePluginConfig {
|
|
23
|
-
// (undocumented)
|
|
24
33
|
disableDeviceCollection?: boolean;
|
|
25
|
-
// (undocumented)
|
|
26
34
|
disableExceptionCollection?: boolean;
|
|
35
|
+
uniqueIdPromiseTimeout?: number;
|
|
27
36
|
}
|
|
28
37
|
|
|
29
38
|
// @public (undocumented)
|
|
@@ -40,11 +49,9 @@ export class ReactNativePlugin extends BaseTelemetryPlugin {
|
|
|
40
49
|
priority: number;
|
|
41
50
|
// (undocumented)
|
|
42
51
|
processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
43
|
-
// (undocumented)
|
|
44
52
|
setDeviceId(newId: string): void;
|
|
45
|
-
|
|
53
|
+
setDeviceInfoModule(deviceInfoModule: IDeviceInfoModule): void;
|
|
46
54
|
setDeviceModel(newModel: string): void;
|
|
47
|
-
// (undocumented)
|
|
48
55
|
setDeviceType(newType: string): void;
|
|
49
56
|
}
|
|
50
57
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights react native plugin,
|
|
2
|
+
* Microsoft Application Insights react native plugin, 3.0.0
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -14,6 +14,38 @@ declare namespace ApplicationInsights {
|
|
|
14
14
|
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
15
15
|
import { ITelemetryPlugin } from '@microsoft/applicationinsights-core-js';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Returns the "react-native-device-info" as the Device Info Module
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
function getReactNativeDeviceInfo(): IDeviceInfoModule;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Interface to abstract how the plugin can access the Device Info, this is a stripped
|
|
25
|
+
* down version of the "react-native-device-info" interface and is mostly supplied for
|
|
26
|
+
* testing.
|
|
27
|
+
*/
|
|
28
|
+
interface IDeviceInfoModule {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the Device Model
|
|
31
|
+
*/
|
|
32
|
+
getModel: () => string;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the device type
|
|
35
|
+
*/
|
|
36
|
+
getDeviceType: () => string;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the unique Id for the device, to support both the current version and previous
|
|
39
|
+
* versions react-native-device-info, this may return either a `string` or `Promise<string>`,
|
|
40
|
+
* when a promise is returned the plugin will "wait" for the promise to `resolve` or `reject`
|
|
41
|
+
* before processing any events. This WILL cause telemetry to be BLOCKED until either of these
|
|
42
|
+
* states, so when returning a Promise it MUST `resolve` or `reject` it can't just never resolve.
|
|
43
|
+
* There is a default timeout configured via `uniqueIdPromiseTimeout` to automatically unblock
|
|
44
|
+
* event processing when this issue occurs.
|
|
45
|
+
*/
|
|
46
|
+
getUniqueId: () => Promise<string> | string;
|
|
47
|
+
}
|
|
48
|
+
|
|
17
49
|
interface INativeDevice {
|
|
18
50
|
/**
|
|
19
51
|
* Device type, e.g. Handset, Tablet, Tv
|
|
@@ -30,8 +62,19 @@ declare namespace ApplicationInsights {
|
|
|
30
62
|
}
|
|
31
63
|
|
|
32
64
|
interface IReactNativePluginConfig {
|
|
65
|
+
/**
|
|
66
|
+
* Disable automatic device collection
|
|
67
|
+
*/
|
|
33
68
|
disableDeviceCollection?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Disable automatic exception collection
|
|
71
|
+
*/
|
|
34
72
|
disableExceptionCollection?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Timeout value to unblock the processing of events if the DeviceInfoModule
|
|
75
|
+
* returns a Promise.
|
|
76
|
+
*/
|
|
77
|
+
uniqueIdPromiseTimeout?: number;
|
|
35
78
|
}
|
|
36
79
|
|
|
37
80
|
class ReactNativePlugin extends BaseTelemetryPlugin {
|
|
@@ -44,8 +87,34 @@ declare namespace ApplicationInsights {
|
|
|
44
87
|
initialize(config?: IReactNativePluginConfig | object, // need `| object` to coerce to interface
|
|
45
88
|
core?: IAppInsightsCore, extensions?: IPlugin[]): void;
|
|
46
89
|
processTelemetry(env: ITelemetryItem, itemCtx?: IProcessTelemetryContext): void;
|
|
90
|
+
/**
|
|
91
|
+
* Set the module that will be used during initialization when collecting device is enabled
|
|
92
|
+
* (the default), automatic collection can be disabled via the `disableDeviceCollection`
|
|
93
|
+
* config. The `react-native-device-info` module will be used by default if no
|
|
94
|
+
* `deviceInfoModule` is set and collection is enabled.
|
|
95
|
+
* @param deviceInfoModule
|
|
96
|
+
*/
|
|
97
|
+
setDeviceInfoModule(deviceInfoModule: IDeviceInfoModule): void;
|
|
98
|
+
/**
|
|
99
|
+
* Manually set the deviceId, if set before initialization and automatic device info collection
|
|
100
|
+
* is enabled this value may get overwritten. If you want to keep this value disable auto
|
|
101
|
+
* collection by setting the `disableDeviceCollection` config to true.
|
|
102
|
+
* @param newId - The value to use as the device Id.
|
|
103
|
+
*/
|
|
47
104
|
setDeviceId(newId: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Manually set the device model, if set before initialization and automatic device info
|
|
107
|
+
* collection is enabled this value may get overwritten. If you want to keep this value
|
|
108
|
+
* disable auto collection by setting the `disableDeviceCollection` config to true.
|
|
109
|
+
* @param newModel - The value to use as the device model.
|
|
110
|
+
*/
|
|
48
111
|
setDeviceModel(newModel: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* Manually set the device type (class), if set before initialization and automatic device
|
|
114
|
+
* info collection is enabled this value may get overwritten. If you want to keep this value
|
|
115
|
+
* disable auto collection by setting the `disableDeviceCollection` config to true.
|
|
116
|
+
* @param newType - The value to use as the device type
|
|
117
|
+
*/
|
|
49
118
|
setDeviceType(newType: string): void;
|
|
50
119
|
}
|
|
51
120
|
|