@dynatrace/react-native-plugin 2.323.1 → 2.325.1
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 +33 -9
- package/android/build.gradle +3 -3
- package/files/plugin-runtime.gradle +8 -1
- package/files/plugin.gradle +1 -1
- package/index.js +18 -10
- package/instrumentation/DynatraceInstrumentation.js +1 -1
- package/instrumentation/jsx/CreateElement.js +10 -7
- package/instrumentation/jsx/ElementHelper.js +0 -5
- package/instrumentation/libs/react-native/Switch.js +55 -12
- package/instrumentation/libs/withOnPressMonitoring.js +1 -1
- package/instrumentation/model/Types.js +0 -1
- package/internal.js +7 -0
- package/lib/core/Dynatrace.js +4 -1
- package/lib/core/DynatraceAction.js +3 -2
- package/lib/core/DynatraceWebRequestTiming.js +5 -5
- package/lib/core/ErrorHandler.js +18 -34
- package/lib/core/NullWebRequestTiming.js +1 -0
- package/lib/core/configuration/Configuration.js +2 -2
- package/lib/core/configuration/ConfigurationBuilder.js +3 -2
- package/lib/core/configuration/ManualStartupConfiguration.js +6 -3
- package/lib/core/interface/IWebRequestTiming.js +1 -0
- package/lib/core/logging/LogLevel.js +1 -10
- package/lib/core/logging/LogLevelUtil.js +13 -0
- package/lib/next/Dynatrace.js +29 -19
- package/lib/next/appstart/AppStartObserver.js +1 -1
- package/lib/next/events/EventCreator.js +2 -1
- package/lib/next/events/EventPipeline.js +14 -6
- package/lib/next/events/HttpRequestEventBuilder.js +196 -0
- package/lib/next/events/IHttpRequestEventBuilder.js +2 -0
- package/lib/next/events/ViewInfoCreator.js +1 -1
- package/lib/next/events/modifier/BaseDataEventModifier.js +6 -0
- package/lib/next/events/modifier/EventModifierUtil.js +34 -1
- package/lib/next/events/modifier/ModifyEventValidation.js +18 -5
- package/lib/next/events/modifier/SendEventValidation.js +23 -10
- package/lib/next/events/spec/EventSpecContstants.js +2 -1
- package/package.json +12 -6
- package/public.js +22 -0
- package/react-augmentation.js +3 -0
- package/react-native-dynatrace.podspec +1 -1
- package/scripts/core/LineOffsetAnalyzeCall.js +3 -3
- package/types.d.ts +1969 -0
- package/instrumentation/jsx/components/Switch.js +0 -57
- package/instrumentation/model/TypesUtil.js +0 -21
- package/src/instrumentation/jsx/IDynatraceProperties.ts +0 -15
- package/typings/react-native-dynatrace.d.ts +0 -1729
|
@@ -1,1729 +0,0 @@
|
|
|
1
|
-
import 'react'
|
|
2
|
-
import { IDynatraceProperties } from '../src/instrumentation/jsx/IDynatraceProperties';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* react-native-dynatrace.d.ts
|
|
6
|
-
*
|
|
7
|
-
* Type definition file for the react native dynatrace package
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Specifying a platform when you want individual behaviour and
|
|
12
|
-
* commands will only be sent to a certain platform.
|
|
13
|
-
*/
|
|
14
|
-
export declare enum Platform {
|
|
15
|
-
/**
|
|
16
|
-
* If set, the command will only be sent to the Android platform.
|
|
17
|
-
*
|
|
18
|
-
* Usage:
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* import { Dynatrace, Platform } from '@dynatrace/react-native-plugin';
|
|
22
|
-
*
|
|
23
|
-
* let myAction = Dynatrace.enterAutoAction("MyButton tapped", Platform.Android);
|
|
24
|
-
* //Perform the action and whatever else is needed.
|
|
25
|
-
* myAction.leaveAction();
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
Android,
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* If set, the command will only be sent to the iOS platform.
|
|
32
|
-
*
|
|
33
|
-
* Usage:
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* import { Dynatrace, Platform } from '@dynatrace/react-native-plugin';
|
|
37
|
-
*
|
|
38
|
-
* let myAction = Dynatrace.enterAutoAction("MyButton tapped", Platform.Ios);
|
|
39
|
-
* //Perform the action and whatever else is needed.
|
|
40
|
-
* myAction.leaveAction();
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
Ios
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Level of log message that will be printed
|
|
48
|
-
*/
|
|
49
|
-
export declare enum LogLevel {
|
|
50
|
-
/**
|
|
51
|
-
* With debug log level, a lot of diagnostic infos will be printed by the plugin.
|
|
52
|
-
*
|
|
53
|
-
* Usage:
|
|
54
|
-
*
|
|
55
|
-
* - via `dynatrace.config.js` by setting `react.debug` to `true`
|
|
56
|
-
* - via code and manual startup by using the `ConfigurationBuilder`:
|
|
57
|
-
*
|
|
58
|
-
* ```ts
|
|
59
|
-
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
60
|
-
*
|
|
61
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
62
|
-
* await Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Debug).buildConfiguration());
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
Debug,
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* With info log level, only the necessary infos will be printed by the plugin.
|
|
69
|
-
*
|
|
70
|
-
* Usage:
|
|
71
|
-
*
|
|
72
|
-
* By default `LogLevel.Info` is used, so usually setting this property is not needed.
|
|
73
|
-
*
|
|
74
|
-
* - via `dynatrace.config.js` by setting `react.debug` to `false`
|
|
75
|
-
* - via code and manual startup by using the `ConfigurationBuilder`:
|
|
76
|
-
*
|
|
77
|
-
* ```ts
|
|
78
|
-
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
79
|
-
*
|
|
80
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
81
|
-
* await Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Info).buildConfiguration());
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
Info
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Enum that represents the different privacy levels. Every level decides about the amount of data,
|
|
89
|
-
* which is actually collected and sent by the agent.
|
|
90
|
-
*
|
|
91
|
-
* Usage:
|
|
92
|
-
*
|
|
93
|
-
* Using `DataCollectionLevel` is only possible when `UserOptIn` was enabled.
|
|
94
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-opt-in-mode
|
|
95
|
-
*
|
|
96
|
-
* General information:
|
|
97
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
98
|
-
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
99
|
-
*/
|
|
100
|
-
export declare enum DataCollectionLevel {
|
|
101
|
-
/**
|
|
102
|
-
* Monitoring data is not sent.
|
|
103
|
-
* - No personal data is sent; all identifiers are randomized on every launch.
|
|
104
|
-
* - A single Loading <App> event is sent to track the number of users that opted out.
|
|
105
|
-
*
|
|
106
|
-
* Usage:
|
|
107
|
-
*
|
|
108
|
-
* ```ts
|
|
109
|
-
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
110
|
-
*
|
|
111
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
112
|
-
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
113
|
-
* ```
|
|
114
|
-
*
|
|
115
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
116
|
-
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
117
|
-
*/
|
|
118
|
-
Off,
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Only performance, automatically captured data is sent.
|
|
122
|
-
* - No personal data is sent; all identifiers are randomized on every launch.
|
|
123
|
-
*
|
|
124
|
-
* Usage:
|
|
125
|
-
*
|
|
126
|
-
* ```ts
|
|
127
|
-
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
128
|
-
*
|
|
129
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Performance, true);
|
|
130
|
-
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
131
|
-
* ```
|
|
132
|
-
*
|
|
133
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
134
|
-
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
135
|
-
*/
|
|
136
|
-
Performance,
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* @deprecated Replaced by `DataCollectionLevel.UserBehavior`
|
|
140
|
-
*/
|
|
141
|
-
User,
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Performance data and user data is sent.
|
|
145
|
-
* - Personal data is sent; OneAgent recognizes and reports users who revisit in the future.
|
|
146
|
-
* - If you haven't configured user tagging and custom event or value reporting, the User behavior level works similarly to the Performance level.
|
|
147
|
-
*
|
|
148
|
-
* Usage:
|
|
149
|
-
*
|
|
150
|
-
* ```ts
|
|
151
|
-
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
152
|
-
*
|
|
153
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.UserBehavior, true);
|
|
154
|
-
* Dynatrace.applyUserPrivacyOptions(privacyConfig);
|
|
155
|
-
* ```
|
|
156
|
-
*
|
|
157
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
158
|
-
* @see https://docs.dynatrace.com/docs/platform-modules/digital-experience/mobile-applications/additional-configuration/configure-rum-privacy-mobile#data-collection-levels
|
|
159
|
-
*/
|
|
160
|
-
UserBehavior,
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
type Primitive = string | number | boolean;
|
|
164
|
-
type JSONArray = JSONValue[];
|
|
165
|
-
type JSONValue = Primitive | JSONArray | JSONObject;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* JSON Object which can be used for sendEvent API
|
|
169
|
-
*/
|
|
170
|
-
export declare interface JSONObject {
|
|
171
|
-
[key: string]: JSONValue;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export declare const Dynatrace: {
|
|
175
|
-
/**
|
|
176
|
-
* Starting the React Native plugin and OneAgent for Android or iOS. This method is only necessary
|
|
177
|
-
* in case of manual startup and should be ignored in auto startup scenarios. The start method will
|
|
178
|
-
* set the error handler for reporting crashes and will apply the provided configuration globally.
|
|
179
|
-
*
|
|
180
|
-
* @param {IConfiguration} configuration Configuration for a manual startup of the plugin
|
|
181
|
-
*
|
|
182
|
-
* Usage:
|
|
183
|
-
*
|
|
184
|
-
* ```ts
|
|
185
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
186
|
-
*
|
|
187
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
188
|
-
* // Use several configuration options like withLogLevel(LogLevel.Debug)
|
|
189
|
-
* await Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
190
|
-
* ```
|
|
191
|
-
*
|
|
192
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
193
|
-
*/
|
|
194
|
-
start(configuration: IConfiguration): Promise<void>;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* This call allows to monitor the passed in component. Depending on the type of the component
|
|
198
|
-
* (Function Component or Class Component), it will be wrapped and data of renderings will be
|
|
199
|
-
* automatically reported.
|
|
200
|
-
*
|
|
201
|
-
* The name of the Component, which can be passed as parameter, is important because the build
|
|
202
|
-
* process will remove the name of a Functional Component. Still this parameter is optional as
|
|
203
|
-
* other properties can be used at runtime as well (e.g. dtActionName).
|
|
204
|
-
*
|
|
205
|
-
* @param Component Functional or Class Component
|
|
206
|
-
* @param {string} name The name of the Component
|
|
207
|
-
* @returns The Component which was wrapped to be monitored
|
|
208
|
-
*
|
|
209
|
-
* Usage:
|
|
210
|
-
*
|
|
211
|
-
* ```ts
|
|
212
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
213
|
-
*
|
|
214
|
-
* export function MyFunctionalComponent(){
|
|
215
|
-
* // Content of component
|
|
216
|
-
* }
|
|
217
|
-
*
|
|
218
|
-
* Dynatrace.withMonitoring(MyFunctionalComponent, "MyFunctionalComponent");
|
|
219
|
-
* ```
|
|
220
|
-
*
|
|
221
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#monitor-a-component
|
|
222
|
-
*/
|
|
223
|
-
withMonitoring(Component: React.FunctionComponent<any> | React.ComponentClass<any>, name?: string): React.FunctionComponent<any> | React.ComponentClass<any>
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Reroutes to `Dynatrace.enterAutoAction`
|
|
227
|
-
*
|
|
228
|
-
* @deprecated Please use either {@link enterAutoAction}, which is doing the same or alternatively {@link enterManualAction}.
|
|
229
|
-
*/
|
|
230
|
-
enterAction(name: string, platform?: Platform): IDynatraceAction;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Creates an Action which will NOT be handled by the plugin. This means that you have full control
|
|
234
|
-
* about the hierachy of your actions. This function will create a {@link IDynatraceRootAction} for you,
|
|
235
|
-
* which has the ability to create child actions via {@link IDynatraceRootAction.enterAction}. Be aware,
|
|
236
|
-
* because of the full manual approach the plugin will not link webrequest automatically. Webrequest
|
|
237
|
-
* have to be manually tagged by using the tag provided by the action via {@link IDynatraceAction.getRequestTag}.
|
|
238
|
-
*
|
|
239
|
-
* @param {string} name Name of the action, which will be created. This name must not be empty.
|
|
240
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
241
|
-
* @returns {IDynatraceRootAction} Action that is created. If name was empty a NullRootAction will be provided,
|
|
242
|
-
* which will act as normal root action, but has no functionality.
|
|
243
|
-
*
|
|
244
|
-
* Usage:
|
|
245
|
-
*
|
|
246
|
-
* ```ts
|
|
247
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
248
|
-
*
|
|
249
|
-
* let myAction = Dynatrace.enterManualAction("MyButton tapped");
|
|
250
|
-
* // Perform the action and whatever else is needed.
|
|
251
|
-
* myAction.leaveAction();
|
|
252
|
-
* ```
|
|
253
|
-
*
|
|
254
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
255
|
-
*/
|
|
256
|
-
enterManualAction(name: string, platform?: Platform): IDynatraceRootAction;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Creates an Action which will be automatically handled by the plugin. This means that the
|
|
260
|
-
* plugin decides about the hierachy of this action. If there is no open action, the following
|
|
261
|
-
* action will be a root action. All other actions created by this method, while a root action
|
|
262
|
-
* is open, will be automatically inserted as a child action. Furthermore the plugin will automatically
|
|
263
|
-
* link webrequest (if they are not tagged manually) to the open root action.
|
|
264
|
-
*
|
|
265
|
-
* @param {string} name Name of the action, which will be created. This name must not be empty.
|
|
266
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
267
|
-
* @returns {IDynatraceAction} Action that is created. If name was empty a NullAction will be provided,
|
|
268
|
-
* which will act as normal action, but has no functionality.
|
|
269
|
-
*
|
|
270
|
-
* Usage:
|
|
271
|
-
*
|
|
272
|
-
* ```ts
|
|
273
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
274
|
-
*
|
|
275
|
-
* let myAction = Dynatrace.enterAutoAction("MyButton tapped");
|
|
276
|
-
* // Perform the action and whatever else is needed.
|
|
277
|
-
* myAction.leaveAction();
|
|
278
|
-
* ```
|
|
279
|
-
*
|
|
280
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
281
|
-
*/
|
|
282
|
-
enterAutoAction(name: string, platform?: Platform): IDynatraceAction;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Can be called to end the current visit and start a new visit. All current actions are
|
|
286
|
-
* closed and sent to the server.
|
|
287
|
-
*
|
|
288
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
289
|
-
*
|
|
290
|
-
* Usage:
|
|
291
|
-
*
|
|
292
|
-
* ```ts
|
|
293
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
294
|
-
*
|
|
295
|
-
* Dynatrace.endSession();
|
|
296
|
-
* ```
|
|
297
|
-
*
|
|
298
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#end-the-current-user-session
|
|
299
|
-
*/
|
|
300
|
-
endSession(platform?: Platform): void;
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* The current visit/session will be tagged with the provided user id.
|
|
304
|
-
* The value will not be stored and has to be renewed for every new session.
|
|
305
|
-
*
|
|
306
|
-
* @param {string} user a unique id that allows you to identify the current user.
|
|
307
|
-
* If user is null or empty, then the user tag will be removed from the session.
|
|
308
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
309
|
-
*
|
|
310
|
-
* Usage:
|
|
311
|
-
*
|
|
312
|
-
* ```ts
|
|
313
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
314
|
-
*
|
|
315
|
-
* Dynatrace.identifyUser('User');
|
|
316
|
-
* ```
|
|
317
|
-
*
|
|
318
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#identify-a-user
|
|
319
|
-
*/
|
|
320
|
-
identifyUser(user: string, platform?: Platform): void;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Saves the given GPS location for reporting along with the captured data.
|
|
324
|
-
*
|
|
325
|
-
* @param {Number} latitude latitude data of the position
|
|
326
|
-
* @param {Number} longitude longitude data of the position
|
|
327
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
328
|
-
*
|
|
329
|
-
* Usage:
|
|
330
|
-
*
|
|
331
|
-
* ```ts
|
|
332
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
333
|
-
*
|
|
334
|
-
* Dynatrace.setGPSLocation(48.31518732698596, 14.305245274594471);
|
|
335
|
-
* ```
|
|
336
|
-
*
|
|
337
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-gps-location
|
|
338
|
-
*/
|
|
339
|
-
setGPSLocation(latitude: Number, longitude: Number, platform?: Platform): void;
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Call this function to flush all collected events immediately. To reduce network chatter, the collected events are usually
|
|
343
|
-
* sent in packages where the oldest event has an age of up to 2 minutes (the default; the maximum age can be configured).
|
|
344
|
-
* Using this function, you can force sending of all collected events regardless of their age.
|
|
345
|
-
*
|
|
346
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
347
|
-
*
|
|
348
|
-
* Usage:
|
|
349
|
-
*
|
|
350
|
-
* ```ts
|
|
351
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
352
|
-
*
|
|
353
|
-
* Dynatrace.flushEvents();
|
|
354
|
-
* ```
|
|
355
|
-
*
|
|
356
|
-
*/
|
|
357
|
-
flushEvents(platform?: Platform): void;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Tells you if you opted into crash reporting. If this value is false, which means off,
|
|
361
|
-
* the native agent will not report a single crash that is happening within the application.
|
|
362
|
-
* This method will always return true, when the user optin feature is not used.
|
|
363
|
-
*
|
|
364
|
-
* @deprecated Please use {@link getUserPrivacyOptions} to get the crash reporting opt-in value.
|
|
365
|
-
*
|
|
366
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
367
|
-
* @returns {Promise<boolean>} Promise which resolves true if crash reporting is opted in.
|
|
368
|
-
*/
|
|
369
|
-
isCrashReportingOptedIn(platform?: Platform): Promise<boolean>;
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Allows the user to activate/deactivate crash reporting and stores the users decisions for future sessions.
|
|
373
|
-
* This method can only be used, when the configuration (dynatrace.config.js) for android or iOS is using the userOptIn mode.
|
|
374
|
-
*
|
|
375
|
-
* @deprecated Please use {@link applyUserPrivacyOptions} to set crash reporting opt-in.
|
|
376
|
-
*
|
|
377
|
-
* @param {boolean} crashReporting Pass true, if you want to enable crash reporting
|
|
378
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
379
|
-
*/
|
|
380
|
-
setCrashReportingOptedIn(crashReporting: boolean, platform?: Platform): void;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Returns the current {@link DataCollectionLevel} which is used by the plugin. This method will always
|
|
384
|
-
* return {@link DataCollectionLevel.UserBehavior}, when the user opt-in feature is not used.
|
|
385
|
-
*
|
|
386
|
-
* @deprecated Please use {@link getUserPrivacyOptions} to get the current data collection level value.
|
|
387
|
-
*
|
|
388
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
389
|
-
* @returns promise which resolve a data collection level string
|
|
390
|
-
*/
|
|
391
|
-
getDataCollectionLevel(platform?: Platform): Promise<DataCollectionLevel>;
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Allows the user to set the {@link DataCollectionLevel} and stores the users decisions for future sessions.
|
|
395
|
-
* This method can only be used, when the configuration (dynatrace.config.js) for android or iOS is using the userOptIn mode.
|
|
396
|
-
* When the user changes the {@link DataCollectionLevel} a new session will be started.
|
|
397
|
-
*
|
|
398
|
-
* @deprecated Please use {@link applyUserPrivacyOptions} to apply the current data collection level value.
|
|
399
|
-
*
|
|
400
|
-
* @param {DataCollectionLevel} dataCollectionLevel New data collection level
|
|
401
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
402
|
-
*/
|
|
403
|
-
setDataCollectionLevel(dataCollectionLevel: DataCollectionLevel, platform?: Platform): void;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Get the current user privacy options including data collection level (Off, Performance, UserBehavior)
|
|
407
|
-
* and if crash reporting opt-in is enabled
|
|
408
|
-
*
|
|
409
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
410
|
-
* @returns {Promise<UserPrivacyOptions>} current user privacy options
|
|
411
|
-
*
|
|
412
|
-
* Usage:
|
|
413
|
-
*
|
|
414
|
-
* ```ts
|
|
415
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
416
|
-
*
|
|
417
|
-
* let privacyOptions = await Dynatrace.getUserPrivacyOptions();
|
|
418
|
-
* ```
|
|
419
|
-
*
|
|
420
|
-
*/
|
|
421
|
-
getUserPrivacyOptions(platform?: Platform): Promise<UserPrivacyOptions>;
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* Creates a new session with the specified privacy settings and stores the privacy settings for future sessions.
|
|
425
|
-
* This method can only be used, when user opt-in feature is enabled. This method call has no effect,
|
|
426
|
-
* if the given privacy settings are identical to the previously specified privacy settings.
|
|
427
|
-
*
|
|
428
|
-
* @param {UserPrivacyOptions} userPrivacyOptions the new privacy settings from the user
|
|
429
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
430
|
-
*
|
|
431
|
-
* Usage:
|
|
432
|
-
*
|
|
433
|
-
* ```ts
|
|
434
|
-
* import { DataCollectionLevel, Dynatrace, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
435
|
-
*
|
|
436
|
-
* Dynatrace.applyUserPrivacyOptions(new UserPrivacyOptions(DataCollectionLevel.Performance, true));
|
|
437
|
-
* ```
|
|
438
|
-
*
|
|
439
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
440
|
-
*/
|
|
441
|
-
applyUserPrivacyOptions(userPrivacyOptions: UserPrivacyOptions, platform?: Platform): void;
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Similar to {@link IDynatraceAction.reportError}. But the error event is reported as root action.
|
|
445
|
-
*
|
|
446
|
-
* @param {string} errorName Name of the error event
|
|
447
|
-
* @param {number} errorCode The code of the error
|
|
448
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
449
|
-
*
|
|
450
|
-
* Usage:
|
|
451
|
-
*
|
|
452
|
-
* ```ts
|
|
453
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
454
|
-
*
|
|
455
|
-
* Dynatrace.reportError("Page not found", 404);
|
|
456
|
-
* ```
|
|
457
|
-
*
|
|
458
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
459
|
-
*/
|
|
460
|
-
reportError(errorName: string, errorCode: number, platform?: Platform): void;
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Reports a stacktrace
|
|
464
|
-
*
|
|
465
|
-
* @deprecated Please use {@link reportErrorStacktrace} instead.
|
|
466
|
-
*
|
|
467
|
-
* @param {string} errorName Name of the Error - SyntaxError
|
|
468
|
-
* @param {string} reason Reason for the Error
|
|
469
|
-
* @param {string} stacktrace Whole Stacktrace
|
|
470
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
471
|
-
*/
|
|
472
|
-
reportErrorWithStacktrace(errorName: string, reason: string, stacktrace: string, platform?: Platform): void;
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Reports a stacktrace
|
|
476
|
-
*
|
|
477
|
-
* @param {string} errorName Name of the error
|
|
478
|
-
* @param {string} errorValue Value of the error
|
|
479
|
-
* @param {string} reason Reason for the error
|
|
480
|
-
* @param {string} stacktrace Whole stacktrace
|
|
481
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
482
|
-
*
|
|
483
|
-
* Usage:
|
|
484
|
-
*
|
|
485
|
-
* ```ts
|
|
486
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
487
|
-
*
|
|
488
|
-
* Dynatrace.reportErrorStacktrace("Error Name", "Error Value", "Reason", "Stacktrace");
|
|
489
|
-
* ```
|
|
490
|
-
*
|
|
491
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-an-error-stacktrace
|
|
492
|
-
*/
|
|
493
|
-
reportErrorStacktrace(errorName: string, errorValue: string, reason: string, stacktrace: string, platform?: Platform): void;
|
|
494
|
-
|
|
495
|
-
/**
|
|
496
|
-
* Reports a custom crash
|
|
497
|
-
*
|
|
498
|
-
* @param {string} crashName Name of the crash
|
|
499
|
-
* @param {string} reason Reason for the crash
|
|
500
|
-
* @param {string} stacktrace Whole stacktrace
|
|
501
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
502
|
-
*
|
|
503
|
-
* Usage:
|
|
504
|
-
*
|
|
505
|
-
* ```ts
|
|
506
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
507
|
-
*
|
|
508
|
-
* Dynatrace.reportCrash("Crash Name", "Reason", "Stacktrace");
|
|
509
|
-
* ```
|
|
510
|
-
*
|
|
511
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manually-report-a-crash
|
|
512
|
-
*/
|
|
513
|
-
reportCrash(crashName: string, reason: string, stacktrace: string, platform?: Platform): void;
|
|
514
|
-
|
|
515
|
-
/**
|
|
516
|
-
* Reports a crash with an error object (which needs to contain a stacktrace)
|
|
517
|
-
*
|
|
518
|
-
* @param {string} crashName Name of the crash
|
|
519
|
-
* @param {Error} crash error object
|
|
520
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
521
|
-
*
|
|
522
|
-
* Usage:
|
|
523
|
-
*
|
|
524
|
-
* ```ts
|
|
525
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
526
|
-
*
|
|
527
|
-
* Dynatrace.reportCrashWithException("Crash Name", error);
|
|
528
|
-
* ```
|
|
529
|
-
*
|
|
530
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manually-report-a-crash
|
|
531
|
-
*/
|
|
532
|
-
reportCrashWithException(crashName: string, crash: Error, platform?: Platform);
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Puts a set of http headers on every agent http request (eg. the Authorization header). It also triggers the agent to
|
|
536
|
-
* reconnect to the beacon endpoint with the new headers. To clear the previous headers,
|
|
537
|
-
* call the method with a null or empty value.
|
|
538
|
-
*
|
|
539
|
-
* @param {Map<string, string>} headers a set of http headers
|
|
540
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
541
|
-
*
|
|
542
|
-
* Usage:
|
|
543
|
-
*
|
|
544
|
-
* ```ts
|
|
545
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
546
|
-
*
|
|
547
|
-
* const beaconHeaders = new Map<string, string>();
|
|
548
|
-
* beaconHeaders.set('headerName', 'headerValue');
|
|
549
|
-
* Dynatrace.setBeaconHeaders(beaconHeaders);
|
|
550
|
-
* ```
|
|
551
|
-
*
|
|
552
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#setting-beacon-headers
|
|
553
|
-
*/
|
|
554
|
-
setBeaconHeaders(headers?: Map<string, string> | null, platform?: Platform): void;
|
|
555
|
-
|
|
556
|
-
/**
|
|
557
|
-
* Send a Business Event
|
|
558
|
-
*
|
|
559
|
-
* With sendBizEvent, you can report a business event. These standalone events are being sent
|
|
560
|
-
* detached from user actions or sessions.
|
|
561
|
-
*
|
|
562
|
-
* Note: The 'dt' key, as well as all 'dt.' prefixed keys are considered reserved by Dynatrace
|
|
563
|
-
* and will be stripped from the passed in attributes.
|
|
564
|
-
*
|
|
565
|
-
* Note: Business events are only supported on Dynatrace SaaS deployments currently.
|
|
566
|
-
*
|
|
567
|
-
* @param {string} type Mandatory event type
|
|
568
|
-
* @param {JSONObject} attributes Must be a valid JSON object and cannot contain functions,
|
|
569
|
-
* undefined, Infinity and NaN as values, otherwise they will be removed.
|
|
570
|
-
* Attributes need to be serializable using JSON.stringify.
|
|
571
|
-
* The resulting event will be populated with attributes parameter,
|
|
572
|
-
* and enriched with additional properties, thus also empty objects are valid.
|
|
573
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
574
|
-
*
|
|
575
|
-
* Usage:
|
|
576
|
-
*
|
|
577
|
-
* ```ts
|
|
578
|
-
* import { Dynatrace, JSONObject } from '@dynatrace/react-native-plugin';
|
|
579
|
-
*
|
|
580
|
-
* Dynatrace.sendBizEvent('type', { custom : 123 });
|
|
581
|
-
* ```
|
|
582
|
-
*
|
|
583
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#business-event-capturing
|
|
584
|
-
*/
|
|
585
|
-
sendBizEvent(type: string, attributes?: JSONObject, platform?: Platform): void;
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Adds an event modifier, which will be executed in the end before
|
|
589
|
-
* the event is transfered. This allows to modify the event to some extent.
|
|
590
|
-
*
|
|
591
|
-
* @param eventModifier Function which is modify an event
|
|
592
|
-
*/
|
|
593
|
-
addEventModifier(eventModifier: IEventModifier): IEventModifier;
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Is removing an event modifier again, so it will not modify events anymore.
|
|
597
|
-
*
|
|
598
|
-
* @param eventModifier Function which should be removed
|
|
599
|
-
*/
|
|
600
|
-
removeEventModifier(eventModifier: IEventModifier): boolean;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* Send a Event
|
|
604
|
-
*
|
|
605
|
-
* With sendEvent, you can report a event.
|
|
606
|
-
*
|
|
607
|
-
* Note: The 'dt' key, as well as all 'dt.' prefixed keys are considered reserved by Dynatrace
|
|
608
|
-
* and will be stripped from the passed in attributes. TODO: Add Others here.
|
|
609
|
-
*
|
|
610
|
-
* @param {string} type Mandatory event type
|
|
611
|
-
* @param {JSONObject} properties Must be a valid JSON object and cannot contain functions,
|
|
612
|
-
* undefined, Infinity and NaN as values, otherwise they will be removed.
|
|
613
|
-
* Attributes need to be serializable using JSON.stringify.
|
|
614
|
-
* The resulting event will be populated with attributes parameter,
|
|
615
|
-
* and enriched with additional properties, thus also empty objects are valid.
|
|
616
|
-
* @param {any} context optional context that can be used to manipulate the resulting event
|
|
617
|
-
* using an event modifier
|
|
618
|
-
*/
|
|
619
|
-
sendEvent(properties: JSONObject, context?: any): void;
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* Sets the current view context which will be used for every event happening in the meantime.
|
|
623
|
-
*
|
|
624
|
-
* @param name Name of the current view
|
|
625
|
-
*/
|
|
626
|
-
startView(name: string): void;
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Removes the current view context
|
|
630
|
-
*/
|
|
631
|
-
stopView(): void;
|
|
632
|
-
|
|
633
|
-
/**
|
|
634
|
-
* Send a Session Properties Event.
|
|
635
|
-
*
|
|
636
|
-
* With sendSessionPropertyEvent you can report properties that apply to all events in the current session. Any
|
|
637
|
-
* custom properties must be added in the 'session_properties.*' namespace, otherwise they will be dropped. Only one
|
|
638
|
-
* session properties event may be active for every session.
|
|
639
|
-
*
|
|
640
|
-
* @param properties any attributes that should be reported for every event in the session.
|
|
641
|
-
*/
|
|
642
|
-
sendSessionPropertyEvent(properties: JSONObject): void;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Interface which declares event modification through modifyEvent
|
|
647
|
-
*/
|
|
648
|
-
export declare interface IEventModifier {
|
|
649
|
-
/**
|
|
650
|
-
* Event as JSONObject is received and can be modified. If instead of the event
|
|
651
|
-
* null is returned, the event will be canceled.
|
|
652
|
-
*
|
|
653
|
-
* @param event Event as JSONObject
|
|
654
|
-
* @param context optional context that can be used to manipulate the resulting event
|
|
655
|
-
* using an event modifier or undefined if not available
|
|
656
|
-
* @returns Either the modified event or null if you want to cancel the event
|
|
657
|
-
*/
|
|
658
|
-
modifyEvent(event: JSONObject | null, context?: any): JSONObject | null;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
export declare interface IDynatraceAction {
|
|
662
|
-
/**
|
|
663
|
-
* Reports an error as key-value pair with the time at which it occurred.
|
|
664
|
-
* This event can be used to report error codes.
|
|
665
|
-
*
|
|
666
|
-
* @param {string} errorName Name of the error event
|
|
667
|
-
* @param {number} errorCode The code of the error
|
|
668
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
669
|
-
*
|
|
670
|
-
* Usage:
|
|
671
|
-
*
|
|
672
|
-
* ```ts
|
|
673
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
674
|
-
*
|
|
675
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
676
|
-
* action.reportError("Page Not Found", 404);
|
|
677
|
-
* action.leaveAction();
|
|
678
|
-
* ```
|
|
679
|
-
*
|
|
680
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
681
|
-
*/
|
|
682
|
-
reportError(errorName: string, errorCode: number, platform?: Platform): void;
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* Reports the time when a specific event occurred. This event can be used to determine when a user passed
|
|
686
|
-
* through a specific part of your application. The reportEvent method is a simple way to track user
|
|
687
|
-
* behavior in your application.
|
|
688
|
-
*
|
|
689
|
-
* @param eventName Name of the event
|
|
690
|
-
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
691
|
-
*
|
|
692
|
-
* Usage:
|
|
693
|
-
*
|
|
694
|
-
* ```ts
|
|
695
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
696
|
-
*
|
|
697
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
698
|
-
* action.reportEvent("Event Name");
|
|
699
|
-
* action.leaveAction();
|
|
700
|
-
* ```
|
|
701
|
-
*
|
|
702
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
703
|
-
*/
|
|
704
|
-
reportEvent(eventName: string, platform?: Platform): void;
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
708
|
-
* important measurement data.
|
|
709
|
-
*
|
|
710
|
-
* @param {string} valueName Name of the value
|
|
711
|
-
* @param {string} value The string value
|
|
712
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
713
|
-
*
|
|
714
|
-
* Usage:
|
|
715
|
-
*
|
|
716
|
-
* ```ts
|
|
717
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
718
|
-
*
|
|
719
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
720
|
-
* action.reportStringValue("Value Name", "Value");
|
|
721
|
-
* action.leaveAction();
|
|
722
|
-
* ```
|
|
723
|
-
*
|
|
724
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
725
|
-
*/
|
|
726
|
-
reportStringValue(valueName: string, value: string, platform?: Platform): void;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
730
|
-
* important measurement data.
|
|
731
|
-
*
|
|
732
|
-
* @param valueName Name of the value
|
|
733
|
-
* @param value Integer value
|
|
734
|
-
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
735
|
-
*
|
|
736
|
-
* Usage:
|
|
737
|
-
*
|
|
738
|
-
* ```ts
|
|
739
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
740
|
-
*
|
|
741
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
742
|
-
* action.reportIntValue("Value Name", 123);
|
|
743
|
-
* action.leaveAction();
|
|
744
|
-
* ```
|
|
745
|
-
*
|
|
746
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
747
|
-
*/
|
|
748
|
-
reportIntValue(valueName: string, value: number, platform?: Platform): void;
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Reports a key-value pair with the time at which this event occurred. This event can be used to report
|
|
752
|
-
* important measurement data.
|
|
753
|
-
*
|
|
754
|
-
* @param valueName Name of the value
|
|
755
|
-
* @param value Double value
|
|
756
|
-
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
757
|
-
*
|
|
758
|
-
* Usage:
|
|
759
|
-
*
|
|
760
|
-
* ```ts
|
|
761
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
762
|
-
*
|
|
763
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
764
|
-
* action.reportDoubleValue("Value Name", 123.123);
|
|
765
|
-
* action.leaveAction();
|
|
766
|
-
* ```
|
|
767
|
-
*
|
|
768
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#report-values
|
|
769
|
-
*/
|
|
770
|
-
reportDoubleValue(valueName: string, value: number, platform?: Platform): void;
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* Completes this action and prepares the data for the next sending interval.
|
|
774
|
-
* When an outer/parent action is exited, all nested/child actions are automatically closed.
|
|
775
|
-
*
|
|
776
|
-
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
777
|
-
*
|
|
778
|
-
* Usage:
|
|
779
|
-
*
|
|
780
|
-
* ```ts
|
|
781
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
782
|
-
*
|
|
783
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
784
|
-
* action.leaveAction();
|
|
785
|
-
* ```
|
|
786
|
-
*
|
|
787
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-actions
|
|
788
|
-
*/
|
|
789
|
-
leaveAction(platform?: Platform): void;
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Cancels this action and discards all associated data
|
|
793
|
-
*
|
|
794
|
-
* @param platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
795
|
-
*
|
|
796
|
-
* Usage:
|
|
797
|
-
*
|
|
798
|
-
* ```ts
|
|
799
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
800
|
-
*
|
|
801
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
802
|
-
* action.cancelAction();
|
|
803
|
-
* ```
|
|
804
|
-
*
|
|
805
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#cancel-actions
|
|
806
|
-
*/
|
|
807
|
-
cancel(platform?: Platform): void;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Retrieve the request tag for this certain root action. This will
|
|
811
|
-
* allow you to manually link a web request to this action if you use
|
|
812
|
-
* this tag as header value.
|
|
813
|
-
*
|
|
814
|
-
* @param {string} url URL that you want to track
|
|
815
|
-
* @returns {Promise<string>} header tag which should be applied onto the request
|
|
816
|
-
*
|
|
817
|
-
* Usage:
|
|
818
|
-
*
|
|
819
|
-
* ```ts
|
|
820
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
821
|
-
*
|
|
822
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
823
|
-
* const requestTag = await action.getRequestTag("http://dynatrace.com");
|
|
824
|
-
* // Attach requestTag as x-dynatrace header to a request
|
|
825
|
-
*
|
|
826
|
-
* action.leaveAction();
|
|
827
|
-
* ```
|
|
828
|
-
*
|
|
829
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
830
|
-
*/
|
|
831
|
-
getRequestTag(url: string): Promise<string>;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* If you want to manually link a web request with an action this is
|
|
835
|
-
* the name of the header you need to set.
|
|
836
|
-
*
|
|
837
|
-
* @returns {string} name of the header that should be used for tagging a request
|
|
838
|
-
*
|
|
839
|
-
* Usage:
|
|
840
|
-
*
|
|
841
|
-
* ```ts
|
|
842
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
843
|
-
*
|
|
844
|
-
* const action = Dynatrace.enterAutoAction("Action Name");
|
|
845
|
-
* const requestTagHeader = await action.getRequestTagHeader();
|
|
846
|
-
* // Use requestTagHeader as header name
|
|
847
|
-
*
|
|
848
|
-
* action.leaveAction();
|
|
849
|
-
* ```
|
|
850
|
-
*
|
|
851
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
852
|
-
*/
|
|
853
|
-
getRequestTagHeader(): string;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* Root action which can additionally to the normal IDynatraceAction
|
|
858
|
-
* create another layer of actions underneath.
|
|
859
|
-
*/
|
|
860
|
-
export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
861
|
-
/**
|
|
862
|
-
* Create a child action
|
|
863
|
-
*
|
|
864
|
-
* @param {string} actionName - name of action
|
|
865
|
-
* @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
|
|
866
|
-
* @return {IDynatraceAction} created action
|
|
867
|
-
*
|
|
868
|
-
* Usage:
|
|
869
|
-
*
|
|
870
|
-
* ```ts
|
|
871
|
-
* import { Dynatrace } from '@dynatrace/react-native-plugin';
|
|
872
|
-
*
|
|
873
|
-
* const parentAction = Dynatrace.enterManualAction("Parent Action Name");
|
|
874
|
-
* const childAction = parentAction.enterAction("Child Action Name");
|
|
875
|
-
* // Do something with actions
|
|
876
|
-
*
|
|
877
|
-
* childAction.leaveAction();
|
|
878
|
-
* parentAction.leaveAction();
|
|
879
|
-
* ```
|
|
880
|
-
*
|
|
881
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#create-custom-sub-actions
|
|
882
|
-
*/
|
|
883
|
-
enterAction(name: string, platform?: Platform): IDynatraceAction;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
/**
|
|
887
|
-
* The Web request timing interface which can be used to measure a web request manually
|
|
888
|
-
*/
|
|
889
|
-
export declare interface IDynatraceWebRequestTiming {
|
|
890
|
-
/**
|
|
891
|
-
* Start the measurment of the web request. Call this before the request is started.
|
|
892
|
-
*
|
|
893
|
-
* Usage (with Axios example):
|
|
894
|
-
*
|
|
895
|
-
* ```ts
|
|
896
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
897
|
-
*
|
|
898
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
899
|
-
* const tag = await action.getRequestTag(url);
|
|
900
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
901
|
-
*
|
|
902
|
-
* try {
|
|
903
|
-
* timing.startWebRequestTiming();
|
|
904
|
-
* const axiosResponse = await axios.get(url, {
|
|
905
|
-
* headers: {
|
|
906
|
-
* timing.getRequestTagHeader(): tag
|
|
907
|
-
* }
|
|
908
|
-
* });
|
|
909
|
-
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
910
|
-
* } catch (error) {
|
|
911
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
912
|
-
* } finally {
|
|
913
|
-
* action.leaveAction();
|
|
914
|
-
* }
|
|
915
|
-
* ```
|
|
916
|
-
*
|
|
917
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
918
|
-
*/
|
|
919
|
-
startWebRequestTiming(): void;
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
923
|
-
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
924
|
-
*
|
|
925
|
-
* @param {number} responseCode Status Code of the response e.g. 200
|
|
926
|
-
* @param {string} responseMessage Message of the response
|
|
927
|
-
*
|
|
928
|
-
* Usage (with Axios example):
|
|
929
|
-
*
|
|
930
|
-
* ```ts
|
|
931
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
932
|
-
*
|
|
933
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
934
|
-
* const tag = await action.getRequestTag(url);
|
|
935
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
936
|
-
*
|
|
937
|
-
* try {
|
|
938
|
-
* timing.startWebRequestTiming();
|
|
939
|
-
* const axiosResponse = await axios.get(url, {
|
|
940
|
-
* headers: {
|
|
941
|
-
* timing.getRequestTagHeader(): tag
|
|
942
|
-
* }
|
|
943
|
-
* });
|
|
944
|
-
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
945
|
-
* } catch (error) {
|
|
946
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
947
|
-
* } finally {
|
|
948
|
-
* action.leaveAction();
|
|
949
|
-
* }
|
|
950
|
-
* ```
|
|
951
|
-
*
|
|
952
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
953
|
-
*/
|
|
954
|
-
stopWebRequestTiming(responseCode: number, responseMessage: string): void;
|
|
955
|
-
|
|
956
|
-
/**
|
|
957
|
-
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
958
|
-
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
959
|
-
*
|
|
960
|
-
* @param {number} responseCode Status Code of the response e.g. 200
|
|
961
|
-
* @param {string} responseMessage Message of the response
|
|
962
|
-
* @param requestSize Request size
|
|
963
|
-
* @param responseSize Response size
|
|
964
|
-
*
|
|
965
|
-
* Usage (with Axios example):
|
|
966
|
-
*
|
|
967
|
-
* ```ts
|
|
968
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
969
|
-
*
|
|
970
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
971
|
-
* const tag = await action.getRequestTag(url);
|
|
972
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
973
|
-
*
|
|
974
|
-
* try {
|
|
975
|
-
* timing.startWebRequestTiming();
|
|
976
|
-
* const axiosResponse = await axios.get(url, {
|
|
977
|
-
* headers: {
|
|
978
|
-
* timing.getRequestTagHeader(): tag
|
|
979
|
-
* }
|
|
980
|
-
* });
|
|
981
|
-
* timing.stopWebRequestTimingWithSize(axiosResponse.status, axiosResponse.data, 122, 63);
|
|
982
|
-
* } catch (error) {
|
|
983
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
984
|
-
* } finally {
|
|
985
|
-
* action.leaveAction();
|
|
986
|
-
* }
|
|
987
|
-
* ```
|
|
988
|
-
*
|
|
989
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
990
|
-
*/
|
|
991
|
-
stopWebRequestTimingWithSize(responseCode: number, responseMessage: string, requestSize: number, responseSize: number): void;
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Returns the content for the header that is needed in order to track a request
|
|
995
|
-
*
|
|
996
|
-
* @returns {string} header tag which should be applied onto the request
|
|
997
|
-
*
|
|
998
|
-
* Usage:
|
|
999
|
-
*
|
|
1000
|
-
* ```ts
|
|
1001
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1002
|
-
*
|
|
1003
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1004
|
-
* const tag = await action.getRequestTag(url);
|
|
1005
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1006
|
-
*
|
|
1007
|
-
* // Printing the same tag which was used as input for DynatraceWebRequestTiming
|
|
1008
|
-
* console.log(timing.getRequestTag());
|
|
1009
|
-
* ```
|
|
1010
|
-
*
|
|
1011
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1012
|
-
*/
|
|
1013
|
-
getRequestTag(): string;
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* Returns the name for the header that is needed in order to track a request
|
|
1017
|
-
*
|
|
1018
|
-
* @returns {string} name of the header that should be used for tagging a request
|
|
1019
|
-
*
|
|
1020
|
-
* Usage:
|
|
1021
|
-
*
|
|
1022
|
-
* ```ts
|
|
1023
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1024
|
-
*
|
|
1025
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1026
|
-
* const tag = await action.getRequestTag(url);
|
|
1027
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1028
|
-
*
|
|
1029
|
-
* // Printing the header name
|
|
1030
|
-
* console.log(timing.getRequestTagHeader());
|
|
1031
|
-
* ```
|
|
1032
|
-
*
|
|
1033
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1034
|
-
*/
|
|
1035
|
-
getRequestTagHeader(): string;
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* Class which gives you the option to measure a web request
|
|
1041
|
-
*/
|
|
1042
|
-
export declare class DynatraceWebRequestTiming implements IDynatraceWebRequestTiming{
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Constructor for creating a DynatraceWebRequestTiming
|
|
1046
|
-
*
|
|
1047
|
-
* @param {string} requestTag Request Tag for the action to be linked to
|
|
1048
|
-
* @param {string} url URL that should be linked
|
|
1049
|
-
*
|
|
1050
|
-
* Usage (with Axios example):
|
|
1051
|
-
*
|
|
1052
|
-
* ```ts
|
|
1053
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1054
|
-
*
|
|
1055
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1056
|
-
* const tag = await action.getRequestTag(url);
|
|
1057
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1058
|
-
*
|
|
1059
|
-
* try {
|
|
1060
|
-
* timing.startWebRequestTiming();
|
|
1061
|
-
* const axiosResponse = await axios.get(url, {
|
|
1062
|
-
* headers: {
|
|
1063
|
-
* timing.getRequestTagHeader(): tag
|
|
1064
|
-
* }
|
|
1065
|
-
* });
|
|
1066
|
-
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
1067
|
-
* } catch (error) {
|
|
1068
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
1069
|
-
* } finally {
|
|
1070
|
-
* action.leaveAction();
|
|
1071
|
-
* }
|
|
1072
|
-
* ```
|
|
1073
|
-
*
|
|
1074
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1075
|
-
*/
|
|
1076
|
-
constructor(requestTag: string, url: string);
|
|
1077
|
-
|
|
1078
|
-
/**
|
|
1079
|
-
* Start the measurment of the web request. Call this before the request is started.
|
|
1080
|
-
*
|
|
1081
|
-
* Usage (with Axios example):
|
|
1082
|
-
*
|
|
1083
|
-
* ```ts
|
|
1084
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1085
|
-
*
|
|
1086
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1087
|
-
* const tag = await action.getRequestTag(url);
|
|
1088
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1089
|
-
*
|
|
1090
|
-
* try {
|
|
1091
|
-
* timing.startWebRequestTiming();
|
|
1092
|
-
* const axiosResponse = await axios.get(url, {
|
|
1093
|
-
* headers: {
|
|
1094
|
-
* timing.getRequestTagHeader(): tag
|
|
1095
|
-
* }
|
|
1096
|
-
* });
|
|
1097
|
-
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
1098
|
-
* } catch (error) {
|
|
1099
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
1100
|
-
* } finally {
|
|
1101
|
-
* action.leaveAction();
|
|
1102
|
-
* }
|
|
1103
|
-
* ```
|
|
1104
|
-
*
|
|
1105
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1106
|
-
*/
|
|
1107
|
-
startWebRequestTiming(): void;
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
1111
|
-
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
1112
|
-
*
|
|
1113
|
-
* @param {number} responseCode Status Code of the response e.g. 200
|
|
1114
|
-
* @param {string} responseMessage Message of the response
|
|
1115
|
-
*
|
|
1116
|
-
* Usage (with Axios example):
|
|
1117
|
-
*
|
|
1118
|
-
* ```ts
|
|
1119
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1120
|
-
*
|
|
1121
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1122
|
-
* const tag = await action.getRequestTag(url);
|
|
1123
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1124
|
-
*
|
|
1125
|
-
* try {
|
|
1126
|
-
* timing.startWebRequestTiming();
|
|
1127
|
-
* const axiosResponse = await axios.get(url, {
|
|
1128
|
-
* headers: {
|
|
1129
|
-
* timing.getRequestTagHeader(): tag
|
|
1130
|
-
* }
|
|
1131
|
-
* });
|
|
1132
|
-
* timing.stopWebRequestTiming(axiosResponse.status, axiosResponse.data);
|
|
1133
|
-
* } catch (error) {
|
|
1134
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
1135
|
-
* } finally {
|
|
1136
|
-
* action.leaveAction();
|
|
1137
|
-
* }
|
|
1138
|
-
* ```
|
|
1139
|
-
*
|
|
1140
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1141
|
-
*/
|
|
1142
|
-
stopWebRequestTiming(responseCode: number, responseMessage: string): void;
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
1146
|
-
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
1147
|
-
*
|
|
1148
|
-
* @param {number} responseCode Status Code of the response e.g. 200
|
|
1149
|
-
* @param {string} responseMessage Message of the response
|
|
1150
|
-
* @param requestSize Request size
|
|
1151
|
-
* @param responseSize Response size
|
|
1152
|
-
*
|
|
1153
|
-
* Usage (with Axios example):
|
|
1154
|
-
*
|
|
1155
|
-
* ```ts
|
|
1156
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1157
|
-
*
|
|
1158
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1159
|
-
* const tag = await action.getRequestTag(url);
|
|
1160
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1161
|
-
*
|
|
1162
|
-
* try {
|
|
1163
|
-
* timing.startWebRequestTiming();
|
|
1164
|
-
* const axiosResponse = await axios.get(url, {
|
|
1165
|
-
* headers: {
|
|
1166
|
-
* timing.getRequestTagHeader(): tag
|
|
1167
|
-
* }
|
|
1168
|
-
* });
|
|
1169
|
-
* timing.stopWebRequestTimingWithSize(axiosResponse.status, axiosResponse.data, 122, 63);
|
|
1170
|
-
* } catch (error) {
|
|
1171
|
-
* timing.stopWebRequestTiming(-1, error);
|
|
1172
|
-
* } finally {
|
|
1173
|
-
* action.leaveAction();
|
|
1174
|
-
* }
|
|
1175
|
-
* ```
|
|
1176
|
-
*
|
|
1177
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1178
|
-
*/
|
|
1179
|
-
stopWebRequestTimingWithSize(responseCode: number, responseMessage: string, requestSize: number, responseSize: number): void;
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Returns the content for the header that is needed in order to track a request
|
|
1183
|
-
*
|
|
1184
|
-
* @returns {string} header tag which should be applied onto the request
|
|
1185
|
-
*
|
|
1186
|
-
* Usage:
|
|
1187
|
-
*
|
|
1188
|
-
* ```ts
|
|
1189
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1190
|
-
*
|
|
1191
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1192
|
-
* const tag = await action.getRequestTag(url);
|
|
1193
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1194
|
-
*
|
|
1195
|
-
* // Printing the same tag which was used as input for DynatraceWebRequestTiming
|
|
1196
|
-
* console.log(timing.getRequestTag());
|
|
1197
|
-
* ```
|
|
1198
|
-
*
|
|
1199
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1200
|
-
*/
|
|
1201
|
-
getRequestTag(): string;
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* Returns the name for the header that is needed in order to track a request
|
|
1205
|
-
*
|
|
1206
|
-
* @returns {string} name of the header that should be used for tagging a request
|
|
1207
|
-
*
|
|
1208
|
-
* Usage:
|
|
1209
|
-
*
|
|
1210
|
-
* ```ts
|
|
1211
|
-
* import { Dynatrace, DynatraceWebRequestTiming } from '@dynatrace/react-native-plugin'
|
|
1212
|
-
*
|
|
1213
|
-
* const action = Dynatrace.enterManualAction("Manual Web Request");
|
|
1214
|
-
* const tag = await action.getRequestTag(url);
|
|
1215
|
-
* const timing = new DynatraceWebRequestTiming(url, tag);
|
|
1216
|
-
*
|
|
1217
|
-
* // Printing the header name
|
|
1218
|
-
* console.log(timing.getRequestTagHeader());
|
|
1219
|
-
* ```
|
|
1220
|
-
*
|
|
1221
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#manual-web-request-tagging
|
|
1222
|
-
*/
|
|
1223
|
-
getRequestTagHeader(): string;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* Represents the privacy settings that the user can select
|
|
1228
|
-
*/
|
|
1229
|
-
export declare class UserPrivacyOptions {
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
* Constructor for creation of a privacy settings object
|
|
1233
|
-
* @param {DataCollectionLevel} dataCollectionLevel Data collection level.
|
|
1234
|
-
* @param {boolean} crashReportingOptedIn If crash reporting should be enabled.
|
|
1235
|
-
*
|
|
1236
|
-
* Usage:
|
|
1237
|
-
*
|
|
1238
|
-
* ```ts
|
|
1239
|
-
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1240
|
-
*
|
|
1241
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1242
|
-
* ```
|
|
1243
|
-
*
|
|
1244
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1245
|
-
*/
|
|
1246
|
-
constructor(dataCollectionLevel: DataCollectionLevel, crashReportingOptedIn: boolean);
|
|
1247
|
-
|
|
1248
|
-
/**
|
|
1249
|
-
* Returns the specified data collection level.
|
|
1250
|
-
*
|
|
1251
|
-
* @returns {DataCollectionLevel} the specified data collection level
|
|
1252
|
-
*
|
|
1253
|
-
* Usage:
|
|
1254
|
-
*
|
|
1255
|
-
* ```ts
|
|
1256
|
-
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1257
|
-
*
|
|
1258
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1259
|
-
* const dataCollectionLevel = privacyConfig.dataCollectionLevel;
|
|
1260
|
-
* ```
|
|
1261
|
-
*
|
|
1262
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1263
|
-
*/
|
|
1264
|
-
get dataCollectionLevel(): DataCollectionLevel;
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* Sets the data collection level specified by the user.
|
|
1268
|
-
*
|
|
1269
|
-
* @param {DataCollectionLevel} dataCollectionLevel the specified data collection level from the user
|
|
1270
|
-
*
|
|
1271
|
-
* Usage:
|
|
1272
|
-
*
|
|
1273
|
-
* ```ts
|
|
1274
|
-
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1275
|
-
*
|
|
1276
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1277
|
-
* privacyConfig.dataCollectionLevel = DataCollectionLevel.Performance;
|
|
1278
|
-
* ```
|
|
1279
|
-
*
|
|
1280
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1281
|
-
*/
|
|
1282
|
-
set dataCollectionLevel(dataCollectionLevel: DataCollectionLevel);
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* Returns the opt-in value for crash reporting.
|
|
1286
|
-
*
|
|
1287
|
-
* @return {boolean} the opt-in value for crash reporting
|
|
1288
|
-
*
|
|
1289
|
-
* Usage:
|
|
1290
|
-
*
|
|
1291
|
-
* ```ts
|
|
1292
|
-
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1293
|
-
*
|
|
1294
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1295
|
-
* const crashReporting = privacyConfig.crashReportingOptedIn;
|
|
1296
|
-
* ```
|
|
1297
|
-
*
|
|
1298
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1299
|
-
*/
|
|
1300
|
-
get crashReportingOptedIn(): boolean;
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* Sets the privacy setting for crash reporting.
|
|
1304
|
-
*
|
|
1305
|
-
* @param {boolean} crashReportingOptedIn the opt-in value specified by the user
|
|
1306
|
-
*
|
|
1307
|
-
* Usage:
|
|
1308
|
-
*
|
|
1309
|
-
* ```ts
|
|
1310
|
-
* import { DataCollectionLevel, UserPrivacyOptions } from '@dynatrace/react-native-plugin';
|
|
1311
|
-
*
|
|
1312
|
-
* const privacyConfig = new UserPrivacyOptions(DataCollectionLevel.Off, false);
|
|
1313
|
-
* privacyConfig.crashReportingOptedIn = true;
|
|
1314
|
-
* ```
|
|
1315
|
-
*
|
|
1316
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#user-privacy-options
|
|
1317
|
-
*/
|
|
1318
|
-
set crashReportingOptedIn(crashReportingOptedIn: boolean);
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
/**
|
|
1322
|
-
* Configuration interface which should be used during a manual startup
|
|
1323
|
-
*/
|
|
1324
|
-
export declare interface IConfiguration {
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* Beacon url which is used for communicate with the beacon endpoint. This value is mandatory.
|
|
1328
|
-
*
|
|
1329
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1330
|
-
* native agent configuration.
|
|
1331
|
-
*/
|
|
1332
|
-
readonly beaconUrl: string;
|
|
1333
|
-
|
|
1334
|
-
/**
|
|
1335
|
-
* Needed to identify and report data for this application. This value is mandatory.
|
|
1336
|
-
*
|
|
1337
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1338
|
-
* native agent configuration.
|
|
1339
|
-
*/
|
|
1340
|
-
readonly applicationId: string;
|
|
1341
|
-
|
|
1342
|
-
/**
|
|
1343
|
-
* Enables reporting of crashes. By default this value is true if nothing is passed.
|
|
1344
|
-
*
|
|
1345
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1346
|
-
* native agent configuration.
|
|
1347
|
-
*/
|
|
1348
|
-
readonly reportCrash: boolean;
|
|
1349
|
-
|
|
1350
|
-
/**
|
|
1351
|
-
* Enables the react native error/crash handler. By default this value is true if nothing is passed.
|
|
1352
|
-
*
|
|
1353
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1354
|
-
* react configuration.
|
|
1355
|
-
*/
|
|
1356
|
-
readonly errorHandler: boolean;
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* Reports a fatal error as a crash or as an error.
|
|
1360
|
-
* The default value of true results in an unhandled fatal error being reported as a crash which will also end the current session.
|
|
1361
|
-
* If the value is false, the unhandled fatal error will be reported as an error and the current session will continue.
|
|
1362
|
-
*
|
|
1363
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1364
|
-
* react configuration.
|
|
1365
|
-
*/
|
|
1366
|
-
readonly reportFatalErrorAsCrash: boolean;
|
|
1367
|
-
|
|
1368
|
-
/**
|
|
1369
|
-
* Log level of our plugin during application runtime. By default this values is LogLevel.Info, if nothing is passed.
|
|
1370
|
-
*/
|
|
1371
|
-
readonly logLevel: LogLevel;
|
|
1372
|
-
|
|
1373
|
-
/**
|
|
1374
|
-
* Decide if you want to see update cycles on lifecycle actions as well.
|
|
1375
|
-
* By default this value is false, if nothing is passed. Be aware as this creates a lot more data.
|
|
1376
|
-
*/
|
|
1377
|
-
readonly lifecycleUpdate: boolean;
|
|
1378
|
-
|
|
1379
|
-
/**
|
|
1380
|
-
* Activates the privacy mode when set to true. User consent must be queried and set.
|
|
1381
|
-
* The privacy settings for data collection and crash reporting can be changed via OneAgent SDK
|
|
1382
|
-
* for Mobile as described under Data privacy. By default this value is false, if nothing is passed.
|
|
1383
|
-
*
|
|
1384
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1385
|
-
* native agent configuration.
|
|
1386
|
-
*/
|
|
1387
|
-
readonly userOptIn: boolean;
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* Activates a privacy mode especially for Touchables and Buttons. Setting this option to true
|
|
1391
|
-
* means that a name for the control will no longer be shown, e.g. "Touch on Button".
|
|
1392
|
-
* When setting a dtActionName onto the component this setting will be ignored. By default this value is false,
|
|
1393
|
-
* if nothing is passed.
|
|
1394
|
-
*/
|
|
1395
|
-
readonly actionNamePrivacy: boolean;
|
|
1396
|
-
|
|
1397
|
-
/**
|
|
1398
|
-
* Will define the bundle name which will prefix internal action ids.
|
|
1399
|
-
*/
|
|
1400
|
-
readonly bundleName?: string;
|
|
1401
|
-
|
|
1402
|
-
/**
|
|
1403
|
-
* Will define the bundle version which will extend bundleName signature.
|
|
1404
|
-
*/
|
|
1405
|
-
readonly bundleVersion?: string;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
/**
|
|
1409
|
-
* Manual startup configuration which is used for Dynatrace.start()
|
|
1410
|
-
* @deprecated Use ConfigurationBuilder and IConfiguration instead
|
|
1411
|
-
*/
|
|
1412
|
-
export declare class ManualStartupConfiguration implements IConfiguration {
|
|
1413
|
-
/**
|
|
1414
|
-
* Creates a Manual Startup configuration instance
|
|
1415
|
-
*
|
|
1416
|
-
* @param {string} beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
|
|
1417
|
-
* @param {string} applicationId Identifies your mobile app. This property is mandatory for manual startup
|
|
1418
|
-
* @param {boolean} reportCrash Allows reporting React Native crashes.
|
|
1419
|
-
* @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.
|
|
1420
|
-
* @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.
|
|
1421
|
-
* @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
|
|
1422
|
-
* @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.
|
|
1423
|
-
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
1424
|
-
* @param {string} bundleVersion Will define the bundle version which will extend bundleName signature.
|
|
1425
|
-
*
|
|
1426
|
-
* @deprecated Use ConfigurationBuilder and IConfiguration instead
|
|
1427
|
-
*/
|
|
1428
|
-
constructor(beaconUrl: string, applicationId: string, reportCrash?: boolean,
|
|
1429
|
-
logLevel?: LogLevel, lifecycleUpdate?: boolean, userOptIn?: boolean,
|
|
1430
|
-
actionNamePrivacy?: boolean, bundleName?: string, bundleVersion?: string);
|
|
1431
|
-
|
|
1432
|
-
/**
|
|
1433
|
-
* Beacon url which is used for communicate with the beacon endpoint. This value is mandatory.
|
|
1434
|
-
*
|
|
1435
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1436
|
-
* native agent configuration.
|
|
1437
|
-
*/
|
|
1438
|
-
readonly beaconUrl: string;
|
|
1439
|
-
|
|
1440
|
-
/**
|
|
1441
|
-
* Needed to identify and report data for this application. This value is mandatory.
|
|
1442
|
-
*
|
|
1443
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1444
|
-
* native agent configuration.
|
|
1445
|
-
*/
|
|
1446
|
-
readonly applicationId: string;
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
* Enables reporting of crashes. By default this value is true if nothing is passed.
|
|
1450
|
-
*
|
|
1451
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1452
|
-
* native agent configuration.
|
|
1453
|
-
*/
|
|
1454
|
-
readonly reportCrash: boolean;
|
|
1455
|
-
|
|
1456
|
-
/**
|
|
1457
|
-
* Enables the react native error/crash handler. By default this value is true if nothing is passed.
|
|
1458
|
-
*
|
|
1459
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1460
|
-
* react configuration.
|
|
1461
|
-
*/
|
|
1462
|
-
readonly errorHandler: boolean;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Reports a fatal error as a crash or as an error.
|
|
1466
|
-
* The default value of true results in an unhandled fatal error being reported as a crash which will also end the current session.
|
|
1467
|
-
* If the value is false, the unhandled fatal error will be reported as an error and the current session will continue.
|
|
1468
|
-
*
|
|
1469
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1470
|
-
* react configuration.
|
|
1471
|
-
*/
|
|
1472
|
-
readonly reportFatalErrorAsCrash: boolean;
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* Log level of our plugin during application runtime. By default this values is LogLevel.Info, if nothing is passed.
|
|
1476
|
-
*/
|
|
1477
|
-
readonly logLevel: LogLevel;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* Decide if you want to see update cycles on lifecycle actions as well.
|
|
1481
|
-
* By default this value is false, if nothing is passed. Be aware as this creates a lot more data.
|
|
1482
|
-
*/
|
|
1483
|
-
readonly lifecycleUpdate: boolean;
|
|
1484
|
-
|
|
1485
|
-
/**
|
|
1486
|
-
* Activates the privacy mode when set to true. User consent must be queried and set.
|
|
1487
|
-
* The privacy settings for data collection and crash reporting can be changed via OneAgent SDK
|
|
1488
|
-
* for Mobile as described under Data privacy. By default this value is false, if nothing is passed.
|
|
1489
|
-
*
|
|
1490
|
-
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
1491
|
-
* native agent configuration.
|
|
1492
|
-
*/
|
|
1493
|
-
readonly userOptIn: boolean;
|
|
1494
|
-
|
|
1495
|
-
/**
|
|
1496
|
-
* Activates a privacy mode especially for Touchables and Buttons. Setting this option to true
|
|
1497
|
-
* means that a name for the control will no longer be shown, e.g. "Touch on Button".
|
|
1498
|
-
* When setting a dtActionName onto the component this setting will be ignored. By default this value is false,
|
|
1499
|
-
* if nothing is passed.
|
|
1500
|
-
*/
|
|
1501
|
-
readonly actionNamePrivacy: boolean;
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* Will define the bundle name which will prefix internal action ids.
|
|
1505
|
-
*/
|
|
1506
|
-
readonly bundleName?: string;
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* Will define the bundle version which will extend bundleName signature.
|
|
1510
|
-
*/
|
|
1511
|
-
readonly bundleVersion?: string;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* Builder for Manual startup configuration which is used for Dynatrace.start()
|
|
1516
|
-
*/
|
|
1517
|
-
export declare class ConfigurationBuilder {
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* Creates a builder for Manual Startup configuration
|
|
1521
|
-
*
|
|
1522
|
-
* @param {string} beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
|
|
1523
|
-
* @param {string} applicationId Identifies your mobile app. This property is mandatory for manual startup
|
|
1524
|
-
*
|
|
1525
|
-
* Usage:
|
|
1526
|
-
*
|
|
1527
|
-
* ```ts
|
|
1528
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1529
|
-
*
|
|
1530
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1531
|
-
* Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
1532
|
-
* ```
|
|
1533
|
-
*
|
|
1534
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1535
|
-
*/
|
|
1536
|
-
constructor(beaconUrl: string, applicationId: string);
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* Builder function to handle crash reporting property. By default this is true. Usually
|
|
1540
|
-
* this API only needs to be called in case you want to use `withCrashReporting(false)`.
|
|
1541
|
-
*
|
|
1542
|
-
* @param {boolean} reportCrash Allows reporting React Native crashes.
|
|
1543
|
-
*
|
|
1544
|
-
* Usage:
|
|
1545
|
-
*
|
|
1546
|
-
* ```ts
|
|
1547
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1548
|
-
*
|
|
1549
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1550
|
-
* Dynatrace.start(configurationBuilder.withCrashReporting(true).buildConfiguration());
|
|
1551
|
-
* ```
|
|
1552
|
-
*
|
|
1553
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1554
|
-
*/
|
|
1555
|
-
public withCrashReporting(reportCrash: boolean): ConfigurationBuilder;
|
|
1556
|
-
|
|
1557
|
-
/**
|
|
1558
|
-
* Builder function to handle error handler property. By default this is true. Usually
|
|
1559
|
-
* this API only needs to be called in case you want to use `withErrorHandler(false)`.
|
|
1560
|
-
*
|
|
1561
|
-
* @param {boolean} errorHandler Allows you to enable or disable the Dynatrace React Native error handler.
|
|
1562
|
-
*
|
|
1563
|
-
* Usage:
|
|
1564
|
-
*
|
|
1565
|
-
* ```ts
|
|
1566
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1567
|
-
*
|
|
1568
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1569
|
-
* Dynatrace.start(configurationBuilder.withErrorHandler(true).buildConfiguration());
|
|
1570
|
-
* ```
|
|
1571
|
-
*
|
|
1572
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1573
|
-
*/
|
|
1574
|
-
public withErrorHandler(errorHandler: boolean): ConfigurationBuilder;
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* Builder function to handle preventing crash property. By default this is true. Usually
|
|
1578
|
-
* this API only needs to be called in case you want to use `withReportFatalErrorAsCrash(false)`.
|
|
1579
|
-
*
|
|
1580
|
-
* @param {boolean} reportFatalErrorAsCrash If you want to report a fatal error as an error and not as a crash, set this to false.
|
|
1581
|
-
*
|
|
1582
|
-
* Usage:
|
|
1583
|
-
*
|
|
1584
|
-
* ```ts
|
|
1585
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1586
|
-
*
|
|
1587
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1588
|
-
* Dynatrace.start(configurationBuilder.withReportFatalErrorAsCrash(true).buildConfiguration());
|
|
1589
|
-
* ```
|
|
1590
|
-
*
|
|
1591
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1592
|
-
*/
|
|
1593
|
-
public withReportFatalErrorAsCrash(reportFatalErrorAsCrash: boolean): ConfigurationBuilder;
|
|
1594
|
-
|
|
1595
|
-
/**
|
|
1596
|
-
* Builder function to handle loglevel property. By default this is LogLevel.Info. Usually
|
|
1597
|
-
* this API only needs to be called in case you want to use `withLogLevel(LogLevel.Debug)`.
|
|
1598
|
-
*
|
|
1599
|
-
* @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.
|
|
1600
|
-
*
|
|
1601
|
-
* Usage:
|
|
1602
|
-
*
|
|
1603
|
-
* ```ts
|
|
1604
|
-
* import { ConfigurationBuilder, Dynatrace, LogLevel } from '@dynatrace/react-native-plugin';
|
|
1605
|
-
*
|
|
1606
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1607
|
-
* Dynatrace.start(configurationBuilder.withLogLevel(LogLevel.Debug).buildConfiguration());
|
|
1608
|
-
* ```
|
|
1609
|
-
*
|
|
1610
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1611
|
-
*/
|
|
1612
|
-
public withLogLevel(logLevel: LogLevel): ConfigurationBuilder;
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* Builder function to handle lifecycle update property. By default this is false. Usually
|
|
1616
|
-
* this API only needs to be called in case you want to use `withLifecycleUpdate(true)`.
|
|
1617
|
-
*
|
|
1618
|
-
* @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.
|
|
1619
|
-
*
|
|
1620
|
-
* Usage:
|
|
1621
|
-
*
|
|
1622
|
-
* ```ts
|
|
1623
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1624
|
-
*
|
|
1625
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1626
|
-
* Dynatrace.start(configurationBuilder.withLifecycleUpdate(false).buildConfiguration());
|
|
1627
|
-
* ```
|
|
1628
|
-
*
|
|
1629
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1630
|
-
*/
|
|
1631
|
-
public withLifecycleUpdate(lifecycleUpdate: boolean): ConfigurationBuilder
|
|
1632
|
-
|
|
1633
|
-
/**
|
|
1634
|
-
* Builder function to handle user opt in property. By default this is false. Usually
|
|
1635
|
-
* this API only needs to be called in case you want to use `withUserOptIn(true)`.
|
|
1636
|
-
*
|
|
1637
|
-
* @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
|
|
1638
|
-
*
|
|
1639
|
-
* Usage:
|
|
1640
|
-
*
|
|
1641
|
-
* ```ts
|
|
1642
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1643
|
-
*
|
|
1644
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1645
|
-
* Dynatrace.start(configurationBuilder.withUserOptIn(true).buildConfiguration());
|
|
1646
|
-
* ```
|
|
1647
|
-
*
|
|
1648
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1649
|
-
*/
|
|
1650
|
-
public withUserOptIn(userOptIn: boolean): ConfigurationBuilder;
|
|
1651
|
-
|
|
1652
|
-
/**
|
|
1653
|
-
* Builder function to handle action name privacy property. By default this is false. Usually
|
|
1654
|
-
* this API only needs to be called in case you want to use `withActionNamePrivacy(true)`.
|
|
1655
|
-
*
|
|
1656
|
-
* @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.
|
|
1657
|
-
*
|
|
1658
|
-
* Usage:
|
|
1659
|
-
*
|
|
1660
|
-
* ```ts
|
|
1661
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1662
|
-
*
|
|
1663
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1664
|
-
* Dynatrace.start(configurationBuilder.withActionNamePrivacy(true).buildConfiguration());
|
|
1665
|
-
* ```
|
|
1666
|
-
*
|
|
1667
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1668
|
-
*/
|
|
1669
|
-
public withActionNamePrivacy(actionNamePrivacy: boolean): ConfigurationBuilder;
|
|
1670
|
-
|
|
1671
|
-
/**
|
|
1672
|
-
* Builder function to handle bundle name property
|
|
1673
|
-
*
|
|
1674
|
-
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
1675
|
-
*
|
|
1676
|
-
* Usage:
|
|
1677
|
-
*
|
|
1678
|
-
* ```ts
|
|
1679
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1680
|
-
*
|
|
1681
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1682
|
-
* Dynatrace.start(configurationBuilder.withBundleName("bundleName").buildConfiguration());
|
|
1683
|
-
* ```
|
|
1684
|
-
*
|
|
1685
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1686
|
-
*/
|
|
1687
|
-
public withBundleName(bundleName: string): ConfigurationBuilder;
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
/**
|
|
1691
|
-
* Builder function to handle bundle name property
|
|
1692
|
-
*
|
|
1693
|
-
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
1694
|
-
*
|
|
1695
|
-
* Usage:
|
|
1696
|
-
*
|
|
1697
|
-
* ```ts
|
|
1698
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1699
|
-
*
|
|
1700
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1701
|
-
* Dynatrace.start(configurationBuilder.withBundleName("bundleName").buildConfiguration());
|
|
1702
|
-
* ```
|
|
1703
|
-
*
|
|
1704
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1705
|
-
*/
|
|
1706
|
-
public withBundleVersion(bundleName: string): ConfigurationBuilder;
|
|
1707
|
-
|
|
1708
|
-
/**
|
|
1709
|
-
* Build configuration which is used for startup
|
|
1710
|
-
*
|
|
1711
|
-
* Usage:
|
|
1712
|
-
*
|
|
1713
|
-
* ```ts
|
|
1714
|
-
* import { ConfigurationBuilder, Dynatrace } from '@dynatrace/react-native-plugin';
|
|
1715
|
-
*
|
|
1716
|
-
* const configurationBuilder = new ConfigurationBuilder("beaconUrl", "applicationId");
|
|
1717
|
-
* Dynatrace.start(configurationBuilder.buildConfiguration());
|
|
1718
|
-
* ```
|
|
1719
|
-
*
|
|
1720
|
-
* @see https://www.npmjs.com/package/@dynatrace/react-native-plugin#plugin-startup
|
|
1721
|
-
*/
|
|
1722
|
-
public buildConfiguration(): IConfiguration;
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
declare module 'react' {
|
|
1726
|
-
namespace JSX {
|
|
1727
|
-
interface IntrinsicAttributes extends IDynatraceProperties {}
|
|
1728
|
-
}
|
|
1729
|
-
}
|