@dynatrace/react-native-plugin 2.289.1 → 2.291.2
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 +97 -43
- package/android/build.gradle +1 -1
- package/files/plugin.gradle +1 -1
- package/lib/instrumentor/base/Dynatrace.js +1 -1
- package/lib/react-native/Touchables.js +28 -6
- package/package.json +4 -4
- package/react-native-dynatrace.podspec +1 -1
- package/typings/react-native-dynatrace.d.ts +907 -93
|
@@ -5,16 +5,37 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Specifying a platform when you want individual behaviour
|
|
8
|
+
* Specifying a platform when you want individual behaviour and
|
|
9
|
+
* commands will only be sent to a certain platform.
|
|
9
10
|
*/
|
|
10
11
|
export declare enum Platform {
|
|
11
12
|
/**
|
|
12
|
-
* Android
|
|
13
|
+
* If set, the command will only be sent to the Android platform.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { Dynatrace, Platform } from '@dynatrace/react-native-plugin';
|
|
19
|
+
*
|
|
20
|
+
* let myAction = Dynatrace.enterAutoAction("MyButton tapped", Platform.Android);
|
|
21
|
+
* //Perform the action and whatever else is needed.
|
|
22
|
+
* myAction.leaveAction();
|
|
23
|
+
* ```
|
|
13
24
|
*/
|
|
14
25
|
Android,
|
|
15
26
|
|
|
16
27
|
/**
|
|
17
|
-
* iOS
|
|
28
|
+
* If set, the command will only be sent to the iOS platform.
|
|
29
|
+
*
|
|
30
|
+
* Usage:
|
|
31
|
+
*
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { Dynatrace, Platform } from '@dynatrace/react-native-plugin';
|
|
34
|
+
*
|
|
35
|
+
* let myAction = Dynatrace.enterAutoAction("MyButton tapped", Platform.Ios);
|
|
36
|
+
* //Perform the action and whatever else is needed.
|
|
37
|
+
* myAction.leaveAction();
|
|
38
|
+
* ```
|
|
18
39
|
*/
|
|
19
40
|
Ios
|
|
20
41
|
}
|
|
@@ -24,42 +45,114 @@ export declare enum Platform {
|
|
|
24
45
|
*/
|
|
25
46
|
export declare enum LogLevel {
|
|
26
47
|
/**
|
|
27
|
-
*
|
|
48
|
+
* With debug log level, a lot of diagnostic infos will be printed by the plugin.
|
|
49
|
+
*
|
|
50
|
+
* Usage:
|
|
51
|
+
*
|
|
52
|
+
* - via `dynatrace.config.js` by setting `react.debug` to `true`
|
|
53
|
+
* - via code and manual startup by using the `ConfigurationBuilder`:
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
57
|
+
*
|
|
58
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
59
|
+
* await Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Debug).buildConfiguration());
|
|
60
|
+
* ```
|
|
28
61
|
*/
|
|
29
62
|
Debug,
|
|
30
63
|
|
|
31
64
|
/**
|
|
32
|
-
*
|
|
65
|
+
* With info log level, only the necessary infos will be printed by the plugin.
|
|
66
|
+
*
|
|
67
|
+
* Usage:
|
|
68
|
+
*
|
|
69
|
+
* By default `LogLevel.Info` is used, so usually setting this property is not needed.
|
|
70
|
+
*
|
|
71
|
+
* - via `dynatrace.config.js` by setting `react.debug` to `false`
|
|
72
|
+
* - via code and manual startup by using the `ConfigurationBuilder`:
|
|
73
|
+
*
|
|
74
|
+
* ```ts
|
|
75
|
+
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
76
|
+
*
|
|
77
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
78
|
+
* await Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Info).buildConfiguration());
|
|
79
|
+
* ```
|
|
33
80
|
*/
|
|
34
81
|
Info
|
|
35
82
|
}
|
|
36
83
|
|
|
37
84
|
/**
|
|
38
|
-
* Enum that represents the different privacy levels.
|
|
85
|
+
* Enum that represents the different privacy levels. Every level decides about the amount of data,
|
|
86
|
+
* which is actually collected and sent by the agent.
|
|
87
|
+
*
|
|
88
|
+
* Usage:
|
|
89
|
+
*
|
|
90
|
+
* Using `DataCollectionLevel` is only possible when `UserOptIn` was enabled.
|
|
91
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-opt-in-mode
|
|
92
|
+
*
|
|
93
|
+
* General information:
|
|
94
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
95
|
+
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
39
96
|
*/
|
|
40
97
|
export declare enum DataCollectionLevel {
|
|
41
98
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
99
|
+
* Monitoring data is not sent.
|
|
100
|
+
* - No personal data is sent; all identifiers are randomized on every launch.
|
|
101
|
+
* - A single Loading <App> event is sent to track the number of users that opted out.
|
|
102
|
+
*
|
|
103
|
+
* Usage:
|
|
104
|
+
*
|
|
105
|
+
* ```ts
|
|
106
|
+
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
107
|
+
*
|
|
108
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
109
|
+
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
113
|
+
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
44
114
|
*/
|
|
45
115
|
Off,
|
|
46
116
|
|
|
47
117
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
118
|
+
* Only performance, automatically captured data is sent.
|
|
119
|
+
* - No personal data is sent; all identifiers are randomized on every launch.
|
|
120
|
+
*
|
|
121
|
+
* Usage:
|
|
122
|
+
*
|
|
123
|
+
* ```ts
|
|
124
|
+
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
125
|
+
*
|
|
126
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Performance, true);
|
|
127
|
+
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
131
|
+
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
50
132
|
*/
|
|
51
133
|
Performance,
|
|
52
134
|
|
|
53
135
|
/**
|
|
54
|
-
* @deprecated Replaced by UserBehavior
|
|
55
|
-
* @member {DataCollectionLevel} User
|
|
56
|
-
* @description Native Agent captures both performance and user data.
|
|
136
|
+
* @deprecated Replaced by `DataCollectionLevel.UserBehavior`
|
|
57
137
|
*/
|
|
58
138
|
User,
|
|
59
139
|
|
|
60
140
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
141
|
+
* Performance data and user data is sent.
|
|
142
|
+
* - Personal data is sent; OneAgent recognizes and reports users who revisit in the future.
|
|
143
|
+
* - If you haven't configured user tagging and custom event or value reporting, the User behavior level works similarly to the Performance level.
|
|
144
|
+
*
|
|
145
|
+
* Usage:
|
|
146
|
+
*
|
|
147
|
+
* ```ts
|
|
148
|
+
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
149
|
+
*
|
|
150
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.UserBehavior, true);
|
|
151
|
+
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
155
|
+
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
63
156
|
*/
|
|
64
157
|
UserBehavior,
|
|
65
158
|
}
|
|
@@ -78,10 +171,22 @@ export declare interface JSONObject {
|
|
|
78
171
|
export declare const Dynatrace: {
|
|
79
172
|
/**
|
|
80
173
|
* Starting the React Native plugin and OneAgent for Android or iOS. This method is only necessary
|
|
81
|
-
* in case of manual startup and
|
|
174
|
+
* in case of manual startup and should be ignored in auto startup scenarios. The start method will
|
|
82
175
|
* set the error handler for reporting crashes and will apply the provided configuration globally.
|
|
83
176
|
*
|
|
84
177
|
* @param {IConfiguration} configuration Configuration for a manual startup of the plugin
|
|
178
|
+
*
|
|
179
|
+
* Usage:
|
|
180
|
+
*
|
|
181
|
+
* ```ts
|
|
182
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
183
|
+
*
|
|
184
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
185
|
+
* // Use several configuration options like withLogLevel(LogLevel.Debug)
|
|
186
|
+
* await Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
187
|
+
* ```
|
|
188
|
+
*
|
|
189
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
85
190
|
*/
|
|
86
191
|
start(configuration: IConfiguration): Promise<void>;
|
|
87
192
|
|
|
@@ -97,22 +202,27 @@ export declare const Dynatrace: {
|
|
|
97
202
|
* @param Component Functional or Class Component
|
|
98
203
|
* @param {string} name The name of the Component
|
|
99
204
|
* @returns The Component which was wrapped to be monitored
|
|
205
|
+
*
|
|
206
|
+
* Usage:
|
|
207
|
+
*
|
|
208
|
+
* ```ts
|
|
209
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
210
|
+
*
|
|
211
|
+
* export function MyFunctionalComponent(){
|
|
212
|
+
* // Content of component
|
|
213
|
+
* }
|
|
214
|
+
*
|
|
215
|
+
* Dynatrace.withMonitoring(MyFunctionalComponent, "MyFunctionalComponent");
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#monitor-a-component
|
|
100
219
|
*/
|
|
101
220
|
withMonitoring(Component: React.FunctionComponent<any> | React.ComponentClass<any>, name?: string): React.FunctionComponent<any> | React.ComponentClass<any>
|
|
102
221
|
|
|
103
222
|
/**
|
|
104
|
-
*
|
|
105
|
-
* plugin decides about the hierachy of this action. If there is no open action, the following
|
|
106
|
-
* action will be a root action. All other actions created by this method, while a root action
|
|
107
|
-
* is open, will be automatically inserted as a child action. Furthermore the plugin will automatically
|
|
108
|
-
* link webrequest (if they are not tagged manually) to the open root action.
|
|
223
|
+
* Reroutes to `Dynatrace.enterAutoAction`
|
|
109
224
|
*
|
|
110
225
|
* @deprecated Please use either {@link enterAutoAction}, which is doing the same or alternatively {@link enterManualAction}.
|
|
111
|
-
*
|
|
112
|
-
* @param {string} name Name of the action, which will be created. This name must not be empty.
|
|
113
|
-
* @param {Platform} platform Optional, which means this call will be applied on both platforms (Android & iOS).
|
|
114
|
-
* @returns {IDynatraceAction} Action that is created. If name was empty a NullAction will be provided, which will act as normal action,
|
|
115
|
-
* but has no functionality.
|
|
116
226
|
*/
|
|
117
227
|
enterAction(name: string, platform?: Platform): IDynatraceAction;
|
|
118
228
|
|
|
@@ -127,6 +237,18 @@ export declare const Dynatrace: {
|
|
|
127
237
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
128
238
|
* @returns {IDynatraceRootAction} Action that is created. If name was empty a NullRootAction will be provided,
|
|
129
239
|
* which will act as normal root action, but has no functionality.
|
|
240
|
+
*
|
|
241
|
+
* Usage:
|
|
242
|
+
*
|
|
243
|
+
* ```ts
|
|
244
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
245
|
+
*
|
|
246
|
+
* let myAction = Dynatrace.enterManualAction("MyButton tapped");
|
|
247
|
+
* // Perform the action and whatever else is needed.
|
|
248
|
+
* myAction.leaveAction();
|
|
249
|
+
* ```
|
|
250
|
+
*
|
|
251
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
130
252
|
*/
|
|
131
253
|
enterManualAction(name: string, platform?: Platform): IDynatraceRootAction;
|
|
132
254
|
|
|
@@ -141,6 +263,18 @@ export declare const Dynatrace: {
|
|
|
141
263
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
142
264
|
* @returns {IDynatraceAction} Action that is created. If name was empty a NullAction will be provided,
|
|
143
265
|
* which will act as normal action, but has no functionality.
|
|
266
|
+
*
|
|
267
|
+
* Usage:
|
|
268
|
+
*
|
|
269
|
+
* ```ts
|
|
270
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
271
|
+
*
|
|
272
|
+
* let myAction = Dynatrace.enterAutoAction("MyButton tapped");
|
|
273
|
+
* // Perform the action and whatever else is needed.
|
|
274
|
+
* myAction.leaveAction();
|
|
275
|
+
* ```
|
|
276
|
+
*
|
|
277
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
144
278
|
*/
|
|
145
279
|
enterAutoAction(name: string, platform?: Platform): IDynatraceAction;
|
|
146
280
|
|
|
@@ -149,6 +283,16 @@ export declare const Dynatrace: {
|
|
|
149
283
|
* closed and sent to the server.
|
|
150
284
|
*
|
|
151
285
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
286
|
+
*
|
|
287
|
+
* Usage:
|
|
288
|
+
*
|
|
289
|
+
* ```ts
|
|
290
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
291
|
+
*
|
|
292
|
+
* Dynatrace.endSession();
|
|
293
|
+
* ```
|
|
294
|
+
*
|
|
295
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#end-the-current-user-session
|
|
152
296
|
*/
|
|
153
297
|
endSession(platform?: Platform): void;
|
|
154
298
|
|
|
@@ -159,6 +303,16 @@ export declare const Dynatrace: {
|
|
|
159
303
|
* @param {string} user a unique id that allows you to identify the current user.
|
|
160
304
|
* If user is null or empty, then the user tag will be removed from the session.
|
|
161
305
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
306
|
+
*
|
|
307
|
+
* Usage:
|
|
308
|
+
*
|
|
309
|
+
* ```ts
|
|
310
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
311
|
+
*
|
|
312
|
+
* Dynatrace.identifyUser('User');
|
|
313
|
+
* ```
|
|
314
|
+
*
|
|
315
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#identify-a-user
|
|
162
316
|
*/
|
|
163
317
|
identifyUser(user: string, platform?: Platform): void;
|
|
164
318
|
|
|
@@ -168,6 +322,16 @@ export declare const Dynatrace: {
|
|
|
168
322
|
* @param {Number} latitude latitude data of the position
|
|
169
323
|
* @param {Number} longitude longitude data of the position
|
|
170
324
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
325
|
+
*
|
|
326
|
+
* Usage:
|
|
327
|
+
*
|
|
328
|
+
* ```ts
|
|
329
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
330
|
+
*
|
|
331
|
+
* Dynatrace.setGPSLocation(48.31518732698596, 14.305245274594471);
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-gps-location
|
|
171
335
|
*/
|
|
172
336
|
setGPSLocation(latitude: Number, longitude: Number, platform?: Platform): void;
|
|
173
337
|
|
|
@@ -177,6 +341,15 @@ export declare const Dynatrace: {
|
|
|
177
341
|
* Using this function, you can force sending of all collected events regardless of their age.
|
|
178
342
|
*
|
|
179
343
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
344
|
+
*
|
|
345
|
+
* Usage:
|
|
346
|
+
*
|
|
347
|
+
* ```ts
|
|
348
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
349
|
+
*
|
|
350
|
+
* Dynatrace.flushEvents();
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
180
353
|
*/
|
|
181
354
|
flushEvents(platform?: Platform): void;
|
|
182
355
|
|
|
@@ -232,6 +405,15 @@ export declare const Dynatrace: {
|
|
|
232
405
|
*
|
|
233
406
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
234
407
|
* @returns {Promise<UserPrivacyOptions>} current user privacy options
|
|
408
|
+
*
|
|
409
|
+
* Usage:
|
|
410
|
+
*
|
|
411
|
+
* ```ts
|
|
412
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
413
|
+
*
|
|
414
|
+
* let privacyOptions = await Dynatrace.getUserPrivacyOptions();
|
|
415
|
+
* ```
|
|
416
|
+
*
|
|
235
417
|
*/
|
|
236
418
|
getUserPrivacyOptions(platform?: Platform): Promise<UserPrivacyOptions>;
|
|
237
419
|
|
|
@@ -242,6 +424,16 @@ export declare const Dynatrace: {
|
|
|
242
424
|
*
|
|
243
425
|
* @param {UserPrivacyOptions} userPrivacyOptions the new privacy settings from the user
|
|
244
426
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
427
|
+
*
|
|
428
|
+
* Usage:
|
|
429
|
+
*
|
|
430
|
+
* ```ts
|
|
431
|
+
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
432
|
+
*
|
|
433
|
+
* Dynatrace.applyUserPrivacyOptions(new UserPrivacyOptions(DataCollectionLevel.Performance, true));
|
|
434
|
+
* ```
|
|
435
|
+
*
|
|
436
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
245
437
|
*/
|
|
246
438
|
applyUserPrivacyOptions(userPrivacyOptions: UserPrivacyOptions, platform?: Platform): void;
|
|
247
439
|
|
|
@@ -251,6 +443,16 @@ export declare const Dynatrace: {
|
|
|
251
443
|
* @param {string} errorName Name of the error event
|
|
252
444
|
* @param {number} errorCode The code of the error
|
|
253
445
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
446
|
+
*
|
|
447
|
+
* Usage:
|
|
448
|
+
*
|
|
449
|
+
* ```ts
|
|
450
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
451
|
+
*
|
|
452
|
+
* Dynatrace.reportError("Page not found", 404);
|
|
453
|
+
* ```
|
|
454
|
+
*
|
|
455
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
254
456
|
*/
|
|
255
457
|
reportError(errorName: string, errorCode: number, platform?: Platform): void;
|
|
256
458
|
|
|
@@ -274,6 +476,16 @@ export declare const Dynatrace: {
|
|
|
274
476
|
* @param {string} reason Reason for the error
|
|
275
477
|
* @param {string} stacktrace Whole stacktrace
|
|
276
478
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
479
|
+
*
|
|
480
|
+
* Usage:
|
|
481
|
+
*
|
|
482
|
+
* ```ts
|
|
483
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
484
|
+
*
|
|
485
|
+
* Dynatrace.reportErrorStacktrace("Error Name", "Error Value", "Reason", "Stacktrace");
|
|
486
|
+
* ```
|
|
487
|
+
*
|
|
488
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-an-error-stacktrace
|
|
277
489
|
*/
|
|
278
490
|
reportErrorStacktrace(errorName: string, errorValue: string, reason: string, stacktrace: string, platform?: Platform): void;
|
|
279
491
|
|
|
@@ -284,6 +496,16 @@ export declare const Dynatrace: {
|
|
|
284
496
|
* @param {string} reason Reason for the crash
|
|
285
497
|
* @param {string} stacktrace Whole stacktrace
|
|
286
498
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
499
|
+
*
|
|
500
|
+
* Usage:
|
|
501
|
+
*
|
|
502
|
+
* ```ts
|
|
503
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
504
|
+
*
|
|
505
|
+
* Dynatrace.reportCrash("Crash Name", "Reason", "Stacktrace");
|
|
506
|
+
* ```
|
|
507
|
+
*
|
|
508
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manually-report-a-crash
|
|
287
509
|
*/
|
|
288
510
|
reportCrash(crashName: string, reason: string, stacktrace: string, platform?: Platform): void;
|
|
289
511
|
|
|
@@ -293,6 +515,16 @@ export declare const Dynatrace: {
|
|
|
293
515
|
* @param {string} crashName Name of the crash
|
|
294
516
|
* @param {Error} crash error object
|
|
295
517
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
518
|
+
*
|
|
519
|
+
* Usage:
|
|
520
|
+
*
|
|
521
|
+
* ```ts
|
|
522
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
523
|
+
*
|
|
524
|
+
* Dynatrace.reportCrashWithException("Crash Name", error);
|
|
525
|
+
* ```
|
|
526
|
+
*
|
|
527
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manually-report-a-crash
|
|
296
528
|
*/
|
|
297
529
|
reportCrashWithException(crashName: string, crash: Error, platform?: Platform);
|
|
298
530
|
|
|
@@ -303,6 +535,18 @@ export declare const Dynatrace: {
|
|
|
303
535
|
*
|
|
304
536
|
* @param {Map<string, string>} headers a set of http headers
|
|
305
537
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
538
|
+
*
|
|
539
|
+
* Usage:
|
|
540
|
+
*
|
|
541
|
+
* ```ts
|
|
542
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
543
|
+
*
|
|
544
|
+
* const beaconHeaders = new Map<string, string>();
|
|
545
|
+
* beaconHeaders.set('headerName', 'headerValue');
|
|
546
|
+
* Dynatrace.setBeaconHeaders(beaconHeaders);
|
|
547
|
+
* ```
|
|
548
|
+
*
|
|
549
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#setting-beacon-headers
|
|
306
550
|
*/
|
|
307
551
|
setBeaconHeaders(headers?: Map<string, string> | null, platform?: Platform): void;
|
|
308
552
|
|
|
@@ -324,66 +568,165 @@ export declare const Dynatrace: {
|
|
|
324
568
|
* The resulting event will be populated with attributes parameter,
|
|
325
569
|
* and enriched with additional properties, thus also empty objects are valid.
|
|
326
570
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
571
|
+
*
|
|
572
|
+
* Usage:
|
|
573
|
+
*
|
|
574
|
+
* ```ts
|
|
575
|
+
* import { Dynatrace, JSONObject } from '@dynatrace/react-native-plugin';
|
|
576
|
+
*
|
|
577
|
+
* Dynatrace.sendBizEvent('type', { custom : 123 });
|
|
578
|
+
* ```
|
|
579
|
+
*
|
|
580
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#business-event-capturing
|
|
327
581
|
*/
|
|
328
582
|
sendBizEvent(type: string, attributes?: JSONObject, platform?: Platform): void;
|
|
329
583
|
}
|
|
330
584
|
|
|
331
585
|
export declare interface IDynatraceAction {
|
|
332
586
|
/**
|
|
333
|
-
*
|
|
587
|
+
* Reports an error as key-value pair with the time at which it occurred.
|
|
588
|
+
* This event can be used to report error codes.
|
|
334
589
|
*
|
|
335
590
|
* @param {string} errorName Name of the error event
|
|
336
591
|
* @param {number} errorCode The code of the error
|
|
337
592
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
593
|
+
*
|
|
594
|
+
* Usage:
|
|
595
|
+
*
|
|
596
|
+
* ```ts
|
|
597
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
598
|
+
*
|
|
599
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
600
|
+
* action.reportError("Page Not Found", 404);
|
|
601
|
+
* action.leaveAction();
|
|
602
|
+
* ```
|
|
603
|
+
*
|
|
604
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
338
605
|
*/
|
|
339
606
|
reportError(errorName: string, errorCode: number, platform?: Platform): void;
|
|
340
607
|
|
|
341
608
|
/**
|
|
342
|
-
*
|
|
609
|
+
* Reports the time when a specific event occurred. This event can be used to determine when a user passed
|
|
610
|
+
* through a specific part of your application. The reportEvent method is a simple way to track user
|
|
611
|
+
* behavior in your application.
|
|
343
612
|
*
|
|
344
|
-
* @param
|
|
345
|
-
* @param
|
|
613
|
+
* @param eventName Name of the event
|
|
614
|
+
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
615
|
+
*
|
|
616
|
+
* Usage:
|
|
617
|
+
*
|
|
618
|
+
* ```ts
|
|
619
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
620
|
+
*
|
|
621
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
622
|
+
* action.reportEvent("Event Name");
|
|
623
|
+
* action.leaveAction();
|
|
624
|
+
* ```
|
|
625
|
+
*
|
|
626
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
346
627
|
*/
|
|
347
628
|
reportEvent(eventName: string, platform?: Platform): void;
|
|
348
629
|
|
|
349
630
|
/**
|
|
350
|
-
*
|
|
631
|
+
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
632
|
+
* important measurement data.
|
|
351
633
|
*
|
|
352
634
|
* @param {string} valueName Name of the value
|
|
353
635
|
* @param {string} value The string value
|
|
354
636
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
637
|
+
*
|
|
638
|
+
* Usage:
|
|
639
|
+
*
|
|
640
|
+
* ```ts
|
|
641
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
642
|
+
*
|
|
643
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
644
|
+
* action.reportStringValue("Value Name", "Value");
|
|
645
|
+
* action.leaveAction();
|
|
646
|
+
* ```
|
|
647
|
+
*
|
|
648
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
355
649
|
*/
|
|
356
650
|
reportStringValue(valueName: string, value: string, platform?: Platform): void;
|
|
357
651
|
|
|
358
652
|
/**
|
|
359
|
-
*
|
|
653
|
+
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
654
|
+
* important measurement data.
|
|
360
655
|
*
|
|
361
|
-
* @param
|
|
362
|
-
* @param
|
|
363
|
-
* @param
|
|
656
|
+
* @param valueName Name of the value
|
|
657
|
+
* @param value Integer value
|
|
658
|
+
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
659
|
+
*
|
|
660
|
+
* Usage:
|
|
661
|
+
*
|
|
662
|
+
* ```ts
|
|
663
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
664
|
+
*
|
|
665
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
666
|
+
* action.reportIntValue("Value Name", 123);
|
|
667
|
+
* action.leaveAction();
|
|
668
|
+
* ```
|
|
669
|
+
*
|
|
670
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
364
671
|
*/
|
|
365
672
|
reportIntValue(valueName: string, value: number, platform?: Platform): void;
|
|
366
673
|
|
|
367
674
|
/**
|
|
368
|
-
*
|
|
675
|
+
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
676
|
+
* important measurement data.
|
|
369
677
|
*
|
|
370
|
-
* @param
|
|
371
|
-
* @param
|
|
372
|
-
* @param
|
|
678
|
+
* @param valueName Name of the value
|
|
679
|
+
* @param value Double value
|
|
680
|
+
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
681
|
+
*
|
|
682
|
+
* Usage:
|
|
683
|
+
*
|
|
684
|
+
* ```ts
|
|
685
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
686
|
+
*
|
|
687
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
688
|
+
* action.reportDoubleValue("Value Name", 123.123);
|
|
689
|
+
* action.leaveAction();
|
|
690
|
+
* ```
|
|
691
|
+
*
|
|
692
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
373
693
|
*/
|
|
374
694
|
reportDoubleValue(valueName: string, value: number, platform?: Platform): void;
|
|
375
695
|
|
|
376
696
|
/**
|
|
377
|
-
*
|
|
697
|
+
* Completes this action and prepares the data for the next sending interval.
|
|
698
|
+
* When an outer/parent action is exited, all nested/child actions are automatically closed.
|
|
378
699
|
*
|
|
379
|
-
* @param
|
|
700
|
+
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
701
|
+
*
|
|
702
|
+
* Usage:
|
|
703
|
+
*
|
|
704
|
+
* ```ts
|
|
705
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
706
|
+
*
|
|
707
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
708
|
+
* action.leaveAction();
|
|
709
|
+
* ```
|
|
710
|
+
*
|
|
711
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
380
712
|
*/
|
|
381
713
|
leaveAction(platform?: Platform): void;
|
|
382
714
|
|
|
383
715
|
/**
|
|
384
|
-
*
|
|
716
|
+
* Cancels this action and discards all associated data
|
|
385
717
|
*
|
|
386
|
-
* @param
|
|
718
|
+
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
719
|
+
*
|
|
720
|
+
* Usage:
|
|
721
|
+
*
|
|
722
|
+
* ```ts
|
|
723
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
724
|
+
*
|
|
725
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
726
|
+
* action.cancelAction();
|
|
727
|
+
* ```
|
|
728
|
+
*
|
|
729
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#cancel-actions
|
|
387
730
|
*/
|
|
388
731
|
cancel(platform?: Platform): void;
|
|
389
732
|
|
|
@@ -394,15 +737,43 @@ export declare interface IDynatraceAction {
|
|
|
394
737
|
*
|
|
395
738
|
* @param {string} url URL that you want to track
|
|
396
739
|
* @returns {Promise<string>} header tag which should be applied onto the request
|
|
740
|
+
*
|
|
741
|
+
* Usage:
|
|
742
|
+
*
|
|
743
|
+
* ```ts
|
|
744
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
745
|
+
*
|
|
746
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
747
|
+
* const requestTag = await action.getRequestTag("http://dynatrace.com");
|
|
748
|
+
* // Attach requestTag as x-dynatrace header to a request
|
|
749
|
+
*
|
|
750
|
+
* action.leaveAction();
|
|
751
|
+
* ```
|
|
752
|
+
*
|
|
753
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
397
754
|
*/
|
|
398
755
|
getRequestTag(url: string): Promise<string>;
|
|
399
756
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
757
|
+
/**
|
|
758
|
+
* If you want to manually link a web request with an action this is
|
|
759
|
+
* the name of the header you need to set.
|
|
760
|
+
*
|
|
761
|
+
* @returns {string} name of the header that should be used for tagging a request
|
|
762
|
+
*
|
|
763
|
+
* Usage:
|
|
764
|
+
*
|
|
765
|
+
* ```ts
|
|
766
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
767
|
+
*
|
|
768
|
+
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
769
|
+
* const requestTagHeader = await action.getRequestTagHeader();
|
|
770
|
+
* // Use requestTagHeader as header name
|
|
771
|
+
*
|
|
772
|
+
* action.leaveAction();
|
|
773
|
+
* ```
|
|
774
|
+
*
|
|
775
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
776
|
+
*/
|
|
406
777
|
getRequestTagHeader(): string;
|
|
407
778
|
}
|
|
408
779
|
|
|
@@ -417,6 +788,21 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
417
788
|
* @param {string} actionName - name of action
|
|
418
789
|
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
419
790
|
* @return {IDynatraceAction} created action
|
|
791
|
+
*
|
|
792
|
+
* Usage:
|
|
793
|
+
*
|
|
794
|
+
* ```ts
|
|
795
|
+
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
796
|
+
*
|
|
797
|
+
* const parentAction = Dynatrace.enterManualAction("Parent Action Name");
|
|
798
|
+
* const childAction = parentAction.enterAction("Child Action Name");
|
|
799
|
+
* // Do something with actions
|
|
800
|
+
*
|
|
801
|
+
* childAction.leaveAction();
|
|
802
|
+
* parentAction.leaveAction();
|
|
803
|
+
* ```
|
|
804
|
+
*
|
|
805
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-sub-actions
|
|
420
806
|
*/
|
|
421
807
|
enterAction(name: string, platform?: Platform): IDynatraceAction;
|
|
422
808
|
}
|
|
@@ -425,16 +811,34 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
425
811
|
* The Web request timing interface which can be used to measure a web request manually
|
|
426
812
|
*/
|
|
427
813
|
export declare interface IDynatraceWebRequestTiming {
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Constructor for creating a DynatraceWebRequestTiming
|
|
431
|
-
* @param {string} requestTag Request Tag for the action to be linked to
|
|
432
|
-
* @param {string} url URL that should be linked
|
|
433
|
-
*/
|
|
434
|
-
constructor(requestTag: string, url: string);
|
|
435
|
-
|
|
436
814
|
/**
|
|
437
815
|
* Start the measurment of the web request. Call this before the request is started.
|
|
816
|
+
*
|
|
817
|
+
* Usage (with Axios example):
|
|
818
|
+
*
|
|
819
|
+
* ```ts
|
|
820
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
821
|
+
*
|
|
822
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
823
|
+
* const tag = await action.getRequestTag(url);
|
|
824
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
825
|
+
*
|
|
826
|
+
* try {
|
|
827
|
+
* timing.startWebRequestTiming();
|
|
828
|
+
* const axiosResponse = await axios.get(url, {
|
|
829
|
+
* headers: {
|
|
830
|
+
* timing.getRequestTagHeader(): tag
|
|
831
|
+
* }
|
|
832
|
+
* });
|
|
833
|
+
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
834
|
+
* } catch (error) {
|
|
835
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
836
|
+
* } finally {
|
|
837
|
+
* action.leaveAction();
|
|
838
|
+
* }
|
|
839
|
+
* ```
|
|
840
|
+
*
|
|
841
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
438
842
|
*/
|
|
439
843
|
startWebRequestTiming(): void;
|
|
440
844
|
|
|
@@ -444,13 +848,91 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
444
848
|
*
|
|
445
849
|
* @param {number} responseCode Status Code of the response e.g. 200
|
|
446
850
|
* @param {string} responseMessage Message of the response
|
|
851
|
+
*
|
|
852
|
+
* Usage (with Axios example):
|
|
853
|
+
*
|
|
854
|
+
* ```ts
|
|
855
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
856
|
+
*
|
|
857
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
858
|
+
* const tag = await action.getRequestTag(url);
|
|
859
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
860
|
+
*
|
|
861
|
+
* try {
|
|
862
|
+
* timing.startWebRequestTiming();
|
|
863
|
+
* const axiosResponse = await axios.get(url, {
|
|
864
|
+
* headers: {
|
|
865
|
+
* timing.getRequestTagHeader(): tag
|
|
866
|
+
* }
|
|
867
|
+
* });
|
|
868
|
+
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
869
|
+
* } catch (error) {
|
|
870
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
871
|
+
* } finally {
|
|
872
|
+
* action.leaveAction();
|
|
873
|
+
* }
|
|
874
|
+
* ```
|
|
875
|
+
*
|
|
876
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
447
877
|
*/
|
|
448
878
|
stopWebRequestTiming(responseCode: number, responseMessage: string): void;
|
|
449
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
882
|
+
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
883
|
+
*
|
|
884
|
+
* @param {number} responseCode Status Code of the response e.g. 200
|
|
885
|
+
* @param {string} responseMessage Message of the response
|
|
886
|
+
* @param requestSize Request size
|
|
887
|
+
* @param responseSize Response size
|
|
888
|
+
*
|
|
889
|
+
* Usage (with Axios example):
|
|
890
|
+
*
|
|
891
|
+
* ```ts
|
|
892
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
893
|
+
*
|
|
894
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
895
|
+
* const tag = await action.getRequestTag(url);
|
|
896
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
897
|
+
*
|
|
898
|
+
* try {
|
|
899
|
+
* timing.startWebRequestTiming();
|
|
900
|
+
* const axiosResponse = await axios.get(url, {
|
|
901
|
+
* headers: {
|
|
902
|
+
* timing.getRequestTagHeader(): tag
|
|
903
|
+
* }
|
|
904
|
+
* });
|
|
905
|
+
* timing.stopWebRequestTimingWithSize(axiosResponse.status, axiosResponse.data, 122, 63);
|
|
906
|
+
* } catch (error) {
|
|
907
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
908
|
+
* } finally {
|
|
909
|
+
* action.leaveAction();
|
|
910
|
+
* }
|
|
911
|
+
* ```
|
|
912
|
+
*
|
|
913
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
914
|
+
*/
|
|
915
|
+
stopWebRequestTimingWithSize(responseCode: number, responseMessage: string, requestSize: number, responseSize: number): void;
|
|
916
|
+
|
|
450
917
|
/**
|
|
451
918
|
* Returns the content for the header that is needed in order to track a request
|
|
452
919
|
*
|
|
453
920
|
* @returns {string} header tag which should be applied onto the request
|
|
921
|
+
*
|
|
922
|
+
* Usage:
|
|
923
|
+
*
|
|
924
|
+
* ```ts
|
|
925
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
926
|
+
*
|
|
927
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
928
|
+
* const tag = await action.getRequestTag(url);
|
|
929
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
930
|
+
*
|
|
931
|
+
* // Printing the same tag which was used as input for DynatraceWebRequestTiming
|
|
932
|
+
* console.log(timing.getRequestTag());
|
|
933
|
+
* ```
|
|
934
|
+
*
|
|
935
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
454
936
|
*/
|
|
455
937
|
getRequestTag(): string;
|
|
456
938
|
|
|
@@ -458,6 +940,21 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
458
940
|
* Returns the name for the header that is needed in order to track a request
|
|
459
941
|
*
|
|
460
942
|
* @returns {string} name of the header that should be used for tagging a request
|
|
943
|
+
*
|
|
944
|
+
* Usage:
|
|
945
|
+
*
|
|
946
|
+
* ```ts
|
|
947
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
948
|
+
*
|
|
949
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
950
|
+
* const tag = await action.getRequestTag(url);
|
|
951
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
952
|
+
*
|
|
953
|
+
* // Printing the header name
|
|
954
|
+
* console.log(timing.getRequestTagHeader());
|
|
955
|
+
* ```
|
|
956
|
+
*
|
|
957
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
461
958
|
*/
|
|
462
959
|
getRequestTagHeader(): string;
|
|
463
960
|
|
|
@@ -466,17 +963,70 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
466
963
|
/**
|
|
467
964
|
* Class which gives you the option to measure a web request
|
|
468
965
|
*/
|
|
469
|
-
export declare class DynatraceWebRequestTiming {
|
|
966
|
+
export declare class DynatraceWebRequestTiming implements IDynatraceWebRequestTiming{
|
|
470
967
|
|
|
471
968
|
/**
|
|
472
|
-
* Constructor for
|
|
473
|
-
*
|
|
474
|
-
* @param {string}
|
|
969
|
+
* Constructor for creating a DynatraceWebRequestTiming
|
|
970
|
+
*
|
|
971
|
+
* @param {string} requestTag Request Tag for the action to be linked to
|
|
972
|
+
* @param {string} url URL that should be linked
|
|
973
|
+
*
|
|
974
|
+
* Usage (with Axios example):
|
|
975
|
+
*
|
|
976
|
+
* ```ts
|
|
977
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
978
|
+
*
|
|
979
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
980
|
+
* const tag = await action.getRequestTag(url);
|
|
981
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
982
|
+
*
|
|
983
|
+
* try {
|
|
984
|
+
* timing.startWebRequestTiming();
|
|
985
|
+
* const axiosResponse = await axios.get(url, {
|
|
986
|
+
* headers: {
|
|
987
|
+
* timing.getRequestTagHeader(): tag
|
|
988
|
+
* }
|
|
989
|
+
* });
|
|
990
|
+
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
991
|
+
* } catch (error) {
|
|
992
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
993
|
+
* } finally {
|
|
994
|
+
* action.leaveAction();
|
|
995
|
+
* }
|
|
996
|
+
* ```
|
|
997
|
+
*
|
|
998
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
475
999
|
*/
|
|
476
1000
|
constructor(requestTag: string, url: string);
|
|
477
1001
|
|
|
478
1002
|
/**
|
|
479
1003
|
* Start the measurment of the web request. Call this before the request is started.
|
|
1004
|
+
*
|
|
1005
|
+
* Usage (with Axios example):
|
|
1006
|
+
*
|
|
1007
|
+
* ```ts
|
|
1008
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1009
|
+
*
|
|
1010
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1011
|
+
* const tag = await action.getRequestTag(url);
|
|
1012
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1013
|
+
*
|
|
1014
|
+
* try {
|
|
1015
|
+
* timing.startWebRequestTiming();
|
|
1016
|
+
* const axiosResponse = await axios.get(url, {
|
|
1017
|
+
* headers: {
|
|
1018
|
+
* timing.getRequestTagHeader(): tag
|
|
1019
|
+
* }
|
|
1020
|
+
* });
|
|
1021
|
+
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
1022
|
+
* } catch (error) {
|
|
1023
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
1024
|
+
* } finally {
|
|
1025
|
+
* action.leaveAction();
|
|
1026
|
+
* }
|
|
1027
|
+
* ```
|
|
1028
|
+
*
|
|
1029
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
480
1030
|
*/
|
|
481
1031
|
startWebRequestTiming(): void;
|
|
482
1032
|
|
|
@@ -486,21 +1036,114 @@ export declare class DynatraceWebRequestTiming {
|
|
|
486
1036
|
*
|
|
487
1037
|
* @param {number} responseCode Status Code of the response e.g. 200
|
|
488
1038
|
* @param {string} responseMessage Message of the response
|
|
1039
|
+
*
|
|
1040
|
+
* Usage (with Axios example):
|
|
1041
|
+
*
|
|
1042
|
+
* ```ts
|
|
1043
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1044
|
+
*
|
|
1045
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1046
|
+
* const tag = await action.getRequestTag(url);
|
|
1047
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1048
|
+
*
|
|
1049
|
+
* try {
|
|
1050
|
+
* timing.startWebRequestTiming();
|
|
1051
|
+
* const axiosResponse = await axios.get(url, {
|
|
1052
|
+
* headers: {
|
|
1053
|
+
* timing.getRequestTagHeader(): tag
|
|
1054
|
+
* }
|
|
1055
|
+
* });
|
|
1056
|
+
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
1057
|
+
* } catch (error) {
|
|
1058
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
1059
|
+
* } finally {
|
|
1060
|
+
* action.leaveAction();
|
|
1061
|
+
* }
|
|
1062
|
+
* ```
|
|
1063
|
+
*
|
|
1064
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
489
1065
|
*/
|
|
490
1066
|
stopWebRequestTiming(responseCode: number, responseMessage: string): void;
|
|
491
1067
|
|
|
492
1068
|
/**
|
|
493
|
-
*
|
|
1069
|
+
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
1070
|
+
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
1071
|
+
*
|
|
1072
|
+
* @param {number} responseCode Status Code of the response e.g. 200
|
|
1073
|
+
* @param {string} responseMessage Message of the response
|
|
1074
|
+
* @param requestSize Request size
|
|
1075
|
+
* @param responseSize Response size
|
|
1076
|
+
*
|
|
1077
|
+
* Usage (with Axios example):
|
|
1078
|
+
*
|
|
1079
|
+
* ```ts
|
|
1080
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1081
|
+
*
|
|
1082
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1083
|
+
* const tag = await action.getRequestTag(url);
|
|
1084
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
494
1085
|
*
|
|
495
|
-
*
|
|
1086
|
+
* try {
|
|
1087
|
+
* timing.startWebRequestTiming();
|
|
1088
|
+
* const axiosResponse = await axios.get(url, {
|
|
1089
|
+
* headers: {
|
|
1090
|
+
* timing.getRequestTagHeader(): tag
|
|
1091
|
+
* }
|
|
1092
|
+
* });
|
|
1093
|
+
* timing.stopWebRequestTimingWithSize(axiosResponse.status, axiosResponse.data, 122, 63);
|
|
1094
|
+
* } catch (error) {
|
|
1095
|
+
* timing.stopWebRequestTiming(-1, error);
|
|
1096
|
+
* } finally {
|
|
1097
|
+
* action.leaveAction();
|
|
1098
|
+
* }
|
|
1099
|
+
* ```
|
|
1100
|
+
*
|
|
1101
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
496
1102
|
*/
|
|
1103
|
+
stopWebRequestTimingWithSize(responseCode: number, responseMessage: string, requestSize: number, responseSize: number): void;
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Returns the content for the header that is needed in order to track a request
|
|
1107
|
+
*
|
|
1108
|
+
* @returns {string} header tag which should be applied onto the request
|
|
1109
|
+
*
|
|
1110
|
+
* Usage:
|
|
1111
|
+
*
|
|
1112
|
+
* ```ts
|
|
1113
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1114
|
+
*
|
|
1115
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1116
|
+
* const tag = await action.getRequestTag(url);
|
|
1117
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1118
|
+
*
|
|
1119
|
+
* // Printing the same tag which was used as input for DynatraceWebRequestTiming
|
|
1120
|
+
* console.log(timing.getRequestTag());
|
|
1121
|
+
* ```
|
|
1122
|
+
*
|
|
1123
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1124
|
+
*/
|
|
497
1125
|
getRequestTag(): string;
|
|
498
1126
|
|
|
499
1127
|
/**
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
1128
|
+
* Returns the name for the header that is needed in order to track a request
|
|
1129
|
+
*
|
|
1130
|
+
* @returns {string} name of the header that should be used for tagging a request
|
|
1131
|
+
*
|
|
1132
|
+
* Usage:
|
|
1133
|
+
*
|
|
1134
|
+
* ```ts
|
|
1135
|
+
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1136
|
+
*
|
|
1137
|
+
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1138
|
+
* const tag = await action.getRequestTag(url);
|
|
1139
|
+
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1140
|
+
*
|
|
1141
|
+
* // Printing the header name
|
|
1142
|
+
* console.log(timing.getRequestTagHeader());
|
|
1143
|
+
* ```
|
|
1144
|
+
*
|
|
1145
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1146
|
+
*/
|
|
504
1147
|
getRequestTagHeader(): string;
|
|
505
1148
|
}
|
|
506
1149
|
|
|
@@ -513,35 +1156,89 @@ export declare class UserPrivacyOptions {
|
|
|
513
1156
|
* Constructor for creation of a privacy settings object
|
|
514
1157
|
* @param {DataCollectionLevel} dataCollectionLevel Data collection level.
|
|
515
1158
|
* @param {boolean} crashReportingOptedIn If crash reporting should be enabled.
|
|
516
|
-
|
|
1159
|
+
*
|
|
1160
|
+
* Usage:
|
|
1161
|
+
*
|
|
1162
|
+
* ```ts
|
|
1163
|
+
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1164
|
+
*
|
|
1165
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1166
|
+
* ```
|
|
1167
|
+
*
|
|
1168
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1169
|
+
*/
|
|
517
1170
|
constructor(dataCollectionLevel: DataCollectionLevel, crashReportingOptedIn: boolean);
|
|
518
1171
|
|
|
519
1172
|
/**
|
|
520
1173
|
* Returns the specified data collection level.
|
|
521
|
-
*
|
|
1174
|
+
*
|
|
522
1175
|
* @returns {DataCollectionLevel} the specified data collection level
|
|
523
|
-
|
|
1176
|
+
*
|
|
1177
|
+
* Usage:
|
|
1178
|
+
*
|
|
1179
|
+
* ```ts
|
|
1180
|
+
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1181
|
+
*
|
|
1182
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1183
|
+
* const dataCollectionLevel = privacyConfig.dataCollectionLevel;
|
|
1184
|
+
* ```
|
|
1185
|
+
*
|
|
1186
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1187
|
+
*/
|
|
524
1188
|
get dataCollectionLevel(): DataCollectionLevel;
|
|
525
1189
|
|
|
526
1190
|
/**
|
|
527
1191
|
* Sets the data collection level specified by the user.
|
|
528
1192
|
*
|
|
529
1193
|
* @param {DataCollectionLevel} dataCollectionLevel the specified data collection level from the user
|
|
530
|
-
|
|
1194
|
+
*
|
|
1195
|
+
* Usage:
|
|
1196
|
+
*
|
|
1197
|
+
* ```ts
|
|
1198
|
+
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1199
|
+
*
|
|
1200
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1201
|
+
* privacyConfig.dataCollectionLevel = DataCollectionLevel.Performance;
|
|
1202
|
+
* ```
|
|
1203
|
+
*
|
|
1204
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1205
|
+
*/
|
|
531
1206
|
set dataCollectionLevel(dataCollectionLevel: DataCollectionLevel);
|
|
532
1207
|
|
|
533
1208
|
/**
|
|
534
1209
|
* Returns the opt-in value for crash reporting.
|
|
535
1210
|
*
|
|
536
1211
|
* @return {boolean} the opt-in value for crash reporting
|
|
537
|
-
|
|
1212
|
+
*
|
|
1213
|
+
* Usage:
|
|
1214
|
+
*
|
|
1215
|
+
* ```ts
|
|
1216
|
+
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1217
|
+
*
|
|
1218
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1219
|
+
* const crashReporting = privacyConfig.crashReportingOptedIn;
|
|
1220
|
+
* ```
|
|
1221
|
+
*
|
|
1222
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1223
|
+
*/
|
|
538
1224
|
get crashReportingOptedIn(): boolean;
|
|
539
1225
|
|
|
540
1226
|
/**
|
|
541
1227
|
* Sets the privacy setting for crash reporting.
|
|
542
1228
|
*
|
|
543
1229
|
* @param {boolean} crashReportingOptedIn the opt-in value specified by the user
|
|
544
|
-
|
|
1230
|
+
*
|
|
1231
|
+
* Usage:
|
|
1232
|
+
*
|
|
1233
|
+
* ```ts
|
|
1234
|
+
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1235
|
+
*
|
|
1236
|
+
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1237
|
+
* privacyConfig.crashReportingOptedIn = true;
|
|
1238
|
+
* ```
|
|
1239
|
+
*
|
|
1240
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1241
|
+
*/
|
|
545
1242
|
set crashReportingOptedIn(crashReportingOptedIn: boolean);
|
|
546
1243
|
}
|
|
547
1244
|
|
|
@@ -737,67 +1434,184 @@ export declare class ConfigurationBuilder {
|
|
|
737
1434
|
*
|
|
738
1435
|
* @param {string} beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
|
|
739
1436
|
* @param {string} applicationId Identifies your mobile app. This property is mandatory for manual startup
|
|
1437
|
+
*
|
|
1438
|
+
* Usage:
|
|
1439
|
+
*
|
|
1440
|
+
* ```ts
|
|
1441
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1442
|
+
*
|
|
1443
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1444
|
+
* Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
1445
|
+
* ```
|
|
1446
|
+
*
|
|
1447
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
740
1448
|
*/
|
|
741
1449
|
constructor(beaconUrl: string, applicationId: string);
|
|
742
1450
|
|
|
743
1451
|
/**
|
|
744
|
-
|
|
745
|
-
*
|
|
746
|
-
|
|
747
|
-
|
|
1452
|
+
* Builder function to handle crash reporting property. By default this is true. Usually
|
|
1453
|
+
* this API only needs to be called in case you want to use `withCrashReporting(false)`.
|
|
1454
|
+
*
|
|
1455
|
+
* @param {boolean} reportCrash Allows reporting React Native crashes.
|
|
1456
|
+
*
|
|
1457
|
+
* Usage:
|
|
1458
|
+
*
|
|
1459
|
+
* ```ts
|
|
1460
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1461
|
+
*
|
|
1462
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1463
|
+
* Dynatrace.start(configurationBuilder.withCrashReporting(true).buildConfiguration());
|
|
1464
|
+
* ```
|
|
1465
|
+
*
|
|
1466
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1467
|
+
*/
|
|
748
1468
|
public withCrashReporting(reportCrash: boolean): ConfigurationBuilder;
|
|
749
1469
|
|
|
750
1470
|
/**
|
|
751
|
-
* Builder function to handle error handler property
|
|
1471
|
+
* Builder function to handle error handler property. By default this is true. Usually
|
|
1472
|
+
* this API only needs to be called in case you want to use `withErrorHandler(false)`.
|
|
752
1473
|
*
|
|
753
1474
|
* @param {boolean} errorHandler Allows you to enable or disable the Dynatrace React Native error handler.
|
|
754
|
-
|
|
1475
|
+
*
|
|
1476
|
+
* Usage:
|
|
1477
|
+
*
|
|
1478
|
+
* ```ts
|
|
1479
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1480
|
+
*
|
|
1481
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1482
|
+
* Dynatrace.start(configurationBuilder.withErrorHandler(true).buildConfiguration());
|
|
1483
|
+
* ```
|
|
1484
|
+
*
|
|
1485
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1486
|
+
*/
|
|
755
1487
|
public withErrorHandler(errorHandler: boolean): ConfigurationBuilder;
|
|
756
1488
|
|
|
757
1489
|
/**
|
|
758
|
-
* Builder function to handle preventing crash property
|
|
1490
|
+
* Builder function to handle preventing crash property. By default this is true. Usually
|
|
1491
|
+
* this API only needs to be called in case you want to use `withReportFatalErrorAsCrash(false)`.
|
|
759
1492
|
*
|
|
760
|
-
* @param {boolean} reportFatalErrorAsCrash If you want to report a fatal error as an error and not as a crash, set this to false.
|
|
761
|
-
|
|
1493
|
+
* @param {boolean} reportFatalErrorAsCrash If you want to report a fatal error as an error and not as a crash, set this to false.
|
|
1494
|
+
*
|
|
1495
|
+
* Usage:
|
|
1496
|
+
*
|
|
1497
|
+
* ```ts
|
|
1498
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1499
|
+
*
|
|
1500
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1501
|
+
* Dynatrace.start(configurationBuilder.withReportFatalErrorAsCrash(true).buildConfiguration());
|
|
1502
|
+
* ```
|
|
1503
|
+
*
|
|
1504
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1505
|
+
*/
|
|
762
1506
|
public withReportFatalErrorAsCrash(reportFatalErrorAsCrash: boolean): ConfigurationBuilder;
|
|
763
1507
|
|
|
764
1508
|
/**
|
|
765
|
-
* Builder function to handle loglevel property
|
|
1509
|
+
* Builder function to handle loglevel property. By default this is LogLevel.Info. Usually
|
|
1510
|
+
* this API only needs to be called in case you want to use `withLogLevel(LogLevel.Debug)`.
|
|
766
1511
|
*
|
|
767
1512
|
* @param {LogLevel} logLevel Allows you to choose between `LogLevel.Info` and `LogLevel.Debug`. Debug returns more logs. This is especially important when something is not functioning correctly.
|
|
768
|
-
|
|
1513
|
+
*
|
|
1514
|
+
* Usage:
|
|
1515
|
+
*
|
|
1516
|
+
* ```ts
|
|
1517
|
+
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
1518
|
+
*
|
|
1519
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1520
|
+
* Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Debug).buildConfiguration());
|
|
1521
|
+
* ```
|
|
1522
|
+
*
|
|
1523
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1524
|
+
*/
|
|
769
1525
|
public withLogLevel(logLevel: LogLevel): ConfigurationBuilder;
|
|
770
1526
|
|
|
771
1527
|
/**
|
|
772
|
-
* Builder function to handle lifecycle update property
|
|
1528
|
+
* Builder function to handle lifecycle update property. By default this is false. Usually
|
|
1529
|
+
* this API only needs to be called in case you want to use `withLifecycleUpdate(true)`.
|
|
773
1530
|
*
|
|
774
1531
|
* @param {boolean} lifecycleUpdate Decide if you want to see update cycles on lifecycle actions as well. This is per default false as it creates a lot more actions.
|
|
775
|
-
|
|
1532
|
+
*
|
|
1533
|
+
* Usage:
|
|
1534
|
+
*
|
|
1535
|
+
* ```ts
|
|
1536
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1537
|
+
*
|
|
1538
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1539
|
+
* Dynatrace.start(configurationBuilder.withLifecycleUpdate(false).buildConfiguration());
|
|
1540
|
+
* ```
|
|
1541
|
+
*
|
|
1542
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1543
|
+
*/
|
|
776
1544
|
public withLifecycleUpdate(lifecycleUpdate: boolean): ConfigurationBuilder
|
|
777
1545
|
|
|
778
1546
|
/**
|
|
779
|
-
* Builder function to handle user opt in property
|
|
1547
|
+
* Builder function to handle user opt in property. By default this is false. Usually
|
|
1548
|
+
* this API only needs to be called in case you want to use `withUserOptIn(true)`.
|
|
780
1549
|
*
|
|
781
1550
|
* @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
|
|
782
|
-
|
|
1551
|
+
*
|
|
1552
|
+
* Usage:
|
|
1553
|
+
*
|
|
1554
|
+
* ```ts
|
|
1555
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1556
|
+
*
|
|
1557
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1558
|
+
* Dynatrace.start(configurationBuilder.withUserOptIn(true).buildConfiguration());
|
|
1559
|
+
* ```
|
|
1560
|
+
*
|
|
1561
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1562
|
+
*/
|
|
783
1563
|
public withUserOptIn(userOptIn: boolean): ConfigurationBuilder;
|
|
784
1564
|
|
|
785
1565
|
/**
|
|
786
|
-
* Builder function to handle action name privacy property
|
|
787
|
-
*
|
|
1566
|
+
* Builder function to handle action name privacy property. By default this is false. Usually
|
|
1567
|
+
* this API only needs to be called in case you want to use `withActionNamePrivacy(true)`.
|
|
1568
|
+
*
|
|
788
1569
|
* @param {boolean} actionNamePrivacy Activates a privacy mode especially for Touchables and Buttons. Setting this option to true means that a name for the control will no longer be shown, e.g. "Touch on Button". When setting a dtActionName onto the component this setting will be ignored.
|
|
789
|
-
|
|
1570
|
+
*
|
|
1571
|
+
* Usage:
|
|
1572
|
+
*
|
|
1573
|
+
* ```ts
|
|
1574
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1575
|
+
*
|
|
1576
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1577
|
+
* Dynatrace.start(configurationBuilder.withActionNamePrivacy(true).buildConfiguration());
|
|
1578
|
+
* ```
|
|
1579
|
+
*
|
|
1580
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1581
|
+
*/
|
|
790
1582
|
public withActionNamePrivacy(actionNamePrivacy: boolean): ConfigurationBuilder;
|
|
791
1583
|
|
|
792
1584
|
/**
|
|
793
1585
|
* Builder function to handle bundle name property
|
|
794
1586
|
*
|
|
795
1587
|
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
796
|
-
|
|
1588
|
+
*
|
|
1589
|
+
* Usage:
|
|
1590
|
+
*
|
|
1591
|
+
* ```ts
|
|
1592
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1593
|
+
*
|
|
1594
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1595
|
+
* Dynatrace.start(configurationBuilder.withBundleName("bundleName").buildConfiguration());
|
|
1596
|
+
* ```
|
|
1597
|
+
*
|
|
1598
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1599
|
+
*/
|
|
797
1600
|
public withBundleName(bundleName: string): ConfigurationBuilder;
|
|
798
1601
|
|
|
799
1602
|
/**
|
|
800
1603
|
* Build configuration which is used for startup
|
|
801
|
-
|
|
1604
|
+
*
|
|
1605
|
+
* Usage:
|
|
1606
|
+
*
|
|
1607
|
+
* ```ts
|
|
1608
|
+
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1609
|
+
*
|
|
1610
|
+
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1611
|
+
* Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
1612
|
+
* ```
|
|
1613
|
+
*
|
|
1614
|
+
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1615
|
+
*/
|
|
802
1616
|
public buildConfiguration(): IConfiguration;
|
|
803
1617
|
}
|