@dynatrace/react-native-plugin 2.225.0 → 2.231.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +31 -6
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridge.java +10 -0
  4. package/files/plugin.gradle +1 -1
  5. package/ios/DynatraceRNBridge.m +11 -0
  6. package/ios/lib/Dynatrace.xcframework/Info.plist +69 -0
  7. package/ios/lib/Dynatrace.xcframework/ios-arm64_armv7/Dynatrace.framework/Dynatrace +0 -0
  8. package/ios/lib/Dynatrace.xcframework/ios-arm64_armv7/Dynatrace.framework/Headers/Dynatrace.h +952 -0
  9. package/ios/lib/Dynatrace.xcframework/ios-arm64_armv7/Dynatrace.framework/Headers/Framework.h +18 -0
  10. package/ios/lib/Dynatrace.xcframework/ios-arm64_armv7/Dynatrace.framework/Info.plist +0 -0
  11. package/ios/lib/Dynatrace.xcframework/ios-arm64_armv7/Dynatrace.framework/Modules/module.modulemap +6 -0
  12. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  13. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +952 -0
  14. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/Headers/Framework.h +18 -0
  15. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  16. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +6 -0
  17. package/ios/lib/Dynatrace.xcframework/ios-arm64_i386_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +147 -0
  18. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
  19. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +952 -0
  20. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Framework.h +18 -0
  21. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Info.plist +0 -0
  22. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/module.modulemap +6 -0
  23. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  24. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +952 -0
  25. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Framework.h +18 -0
  26. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  27. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +6 -0
  28. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +135 -0
  29. package/lib/community/Picker.js +33 -0
  30. package/lib/dynatrace-reporter.js +30 -0
  31. package/lib/dynatrace-transformer.js +50 -0
  32. package/lib/instrumentor/base/Application.js +17 -0
  33. package/lib/instrumentor/base/Dynatrace.js +275 -0
  34. package/lib/instrumentor/base/DynatraceAction.js +66 -0
  35. package/lib/instrumentor/base/DynatraceBridge.js +5 -0
  36. package/lib/instrumentor/base/ElementHelper.js +58 -0
  37. package/lib/instrumentor/base/ErrorHandler.js +52 -0
  38. package/lib/instrumentor/base/Logger.js +15 -0
  39. package/lib/instrumentor/base/NullAction.js +27 -0
  40. package/lib/instrumentor/base/Picker.js +32 -0
  41. package/lib/instrumentor/base/RefreshControl.js +35 -0
  42. package/lib/instrumentor/base/Touchable.js +103 -0
  43. package/lib/instrumentor/base/UserPrivacyOptions.js +22 -0
  44. package/lib/instrumentor/base/configuration/AutoStartupConfiguration.js +17 -0
  45. package/lib/instrumentor/base/configuration/Configuration.js +26 -0
  46. package/lib/instrumentor/base/configuration/ConfigurationDefaults.js +13 -0
  47. package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +34 -0
  48. package/lib/instrumentor/base/interface/IAutoConfiguration.js +2 -0
  49. package/lib/instrumentor/base/interface/IDynatrace.js +2 -0
  50. package/lib/instrumentor/base/interface/IDynatraceAction.js +2 -0
  51. package/lib/instrumentor/base/interface/IDynatraceBridge.js +2 -0
  52. package/lib/instrumentor/base/interface/IDynatraceProperties.js +2 -0
  53. package/lib/instrumentor/base/interface/ILogger.js +2 -0
  54. package/lib/instrumentor/base/model/DataCollectionLevel.js +11 -0
  55. package/lib/instrumentor/base/model/LogLevel.js +8 -0
  56. package/lib/instrumentor/base/model/Platform.js +9 -0
  57. package/lib/instrumentor/base/util/StringUtils.js +8 -0
  58. package/lib/instrumentor/dynatrace-instrumentation.js +1 -0
  59. package/lib/instrumentor/model/reference.js +2 -0
  60. package/lib/instrumentor/model/types.js +16 -0
  61. package/lib/instrumentor/parser/babel.js +63 -0
  62. package/lib/jsx-runtime.js +41 -0
  63. package/lib/metro/getSourceMapInfo.js +22 -0
  64. package/lib/react/Component.js +68 -0
  65. package/lib/react-native/RefreshControl.js +14 -0
  66. package/lib/react-native/Touchables.js +63 -0
  67. package/lib/react-native/index.js +12 -0
  68. package/lib/react-native.js +25 -0
  69. package/package.json +155 -1
  70. package/scripts/android.js +123 -0
  71. package/scripts/api/CustomArguments.js +2 -0
  72. package/scripts/api/CustomArgumentsBuilder.js +2 -0
  73. package/scripts/api/model/Platform.js +8 -0
  74. package/scripts/config.js +73 -0
  75. package/scripts/core/CustomArgumentsBuilderImpl.js +22 -0
  76. package/scripts/core/CustomArgumentsImpl.js +33 -0
  77. package/scripts/core/InstrumentCall.js +89 -0
  78. package/scripts/fileOperationHelper.js +184 -0
  79. package/scripts/install.js +47 -0
  80. package/scripts/instrument.js +7 -0
  81. package/scripts/ios.js +179 -0
  82. package/scripts/logger.js +79 -0
  83. package/scripts/pathsConstants.js +60 -0
  84. package/scripts/start.js +6 -0
  85. package/scripts/uninstall.js +80 -0
  86. package/scripts/util/CustomArgumentUtil.js +57 -0
  87. package/scripts/util/SourceMapUtil.js +30 -0
  88. package/scripts/util/StartUtil.js +9 -0
  89. package/scripts/util/instrumentUtil.js +28 -0
  90. package/typings/react-native-dynatrace.d.ts +6 -0
  91. package/util/constants.js +0 -4
@@ -0,0 +1,952 @@
1
+ // Dynatrace.h
2
+ // Version: 8.231.1.1009
3
+ //
4
+ // These materials contain confidential information and
5
+ // trade secrets of Dynatrace Corporation. You shall
6
+ // maintain the materials as confidential and shall not
7
+ // disclose its contents to any third party except as may
8
+ // be required by law or regulation. Use, disclosure,
9
+ // or reproduction is prohibited without the prior express
10
+ // written permission of Dynatrace LLC.
11
+ //
12
+ // All Dynatrace products listed within the materials are
13
+ // trademarks of Dynatrace Corporation. All other company
14
+ // or product names are trademarks of their respective owners.
15
+ //
16
+ // Copyright 2011-2021 Dynatrace LLC
17
+
18
+ #import <Foundation/Foundation.h>
19
+ #import <CoreLocation/CoreLocation.h>
20
+ #import <UIKit/UIKit.h>
21
+
22
+ /*!
23
+ @file Dynatrace.h
24
+ @abstract This is the file developers include in their projects to use the Dynatrace OneAgent.
25
+ @discussion This file provides the declarations of the Dynatrace and DTXAction classes and should
26
+ be included in any iOS source file that uses the Dynatrace OneAgent.
27
+ */
28
+
29
+ #ifndef DYNAFRAMEWORK
30
+ #define DYNAFRAMEWORK
31
+
32
+ /*!
33
+ @typedef DTX_DataCollectionLevel
34
+ @abstract This enum represents the different privacy levels that the user can select.
35
+ @discussion The selected data collection level has no influence on crash reporting, because crash reporting is configured by a different setting.
36
+ @constant DTX_DataCollectionOff The agent does not capture data.
37
+ @constant DTX_DataCollectionPerformance The agent only captures anonymous performance data.
38
+ @constant DTX_DataCollectionUserBehavior The agent captures performance and user data.
39
+ */
40
+ typedef NS_ENUM(int, DTX_DataCollectionLevel) {
41
+ DTX_DataCollectionOff,
42
+ DTX_DataCollectionPerformance,
43
+ DTX_DataCollectionUserBehavior
44
+ };
45
+
46
+ /*!
47
+ @typedef DTX_StatusCode
48
+ @abstract Usage of status codes is discouraged, it will be removed in a future release.
49
+ @constant DTX_CaptureOff OneAgent is not enabled or can't capture data.
50
+ @constant DTX_CaptureOn OneAgent is enabled.
51
+ @constant DTX_CrashReportingUnavailable PL Crash Reporter framework is unavailable to OneAgent.
52
+ @constant DTX_CrashReportingAvailable PL Crash Reporter framework is available to OneAgent.
53
+ @constant DTX_Error_NotInitialized OneAgent is not initialized.
54
+ @constant DTX_Error_InvalidRange Parameter value specified is outside of permitted range.
55
+ @constant DTX_Error_InternalError An internal error occurred.
56
+ @constant DTX_Error_ActionNotFound A corresponding enterAction event was not found for the current leaveAction.
57
+ @constant DTX_Error_InvalidParameter A null or 0 length serverURL, applicationName, actionName, or eventName are used.
58
+ @constant DTX_Error_ActionEnded The action has already been ended via the leaveAction method.
59
+ @constant DTX_Error_ActionCancelled The action has already been cancelled via the cancelAction method.
60
+ @constant DTX_ReportErrorOff DEPRECATED in version >= 8.223: Returned if the DT server has turned error reporting off.
61
+ @constant DTX_TruncatedEventName Returned if the actionName or eventName exceeds maximum length.
62
+ @constant DTX_CrashReportInvalid Crash Report was invalid.
63
+ @constant DTX_TruncatedUserId Returned if the userid exceeds maximum length.
64
+ */
65
+ typedef NS_ENUM(int, DTX_StatusCode) {
66
+ DTX_CaptureOff = 1,
67
+ DTX_CaptureOn = 2,
68
+ DTX_CrashReportingUnavailable = 4,
69
+ DTX_CrashReportingAvailable = 5,
70
+ DTX_Error_NotInitialized = -1,
71
+ DTX_Error_InvalidRange = -2,
72
+ DTX_Error_InternalError = -3,
73
+ DTX_Error_ActionNotFound = -4,
74
+ DTX_Error_InvalidParameter = -5,
75
+ DTX_Error_ActionEnded = -6,
76
+ DTX_Error_ActionCancelled = -7,
77
+ DTX_ReportErrorOff = -8, // DEPRECATED in version >= 8.223
78
+ DTX_TruncatedEventName = -9,
79
+ DTX_CrashReportInvalid = -10,
80
+ DTX_TruncatedUserId = -11,
81
+ };
82
+
83
+ /*!
84
+ @category UIControl (DynatraceCustomization)
85
+ @abstract Category for changing the instrumentation behaviour of UIControls.
86
+ */
87
+ @interface UIControl (DynatraceCustomization)
88
+
89
+ /*!
90
+ @brief Sets a custom name for the control.
91
+
92
+ The custom name is used instead of the captured control title. This can be used to customise control names or hide them for privacy reasons.
93
+ Providing an empty String will use the control type as name (e.g. "Button"). Providing nil will reset to default behaviour.
94
+ @param name The custom name that will be used instead of the captured control title.
95
+ */
96
+ - (void)dtxCustomControlName:(NSString* _Nullable)name;
97
+
98
+ @end
99
+
100
+ /*!
101
+ @category UITableViewCell (DynatraceCustomization)
102
+ @abstract Category for changing the instrumentation behaviour of UITableViewCells.
103
+ */
104
+ @interface UITableViewCell (DynatraceCustomization)
105
+
106
+ /*!
107
+ @brief Sets a custom name for the table cell.
108
+
109
+ The custom name is used instead of the captured cell title. This can be used to customise cell names or hide them for privacy reasons.
110
+ Providing an empty String will use the cell type as name (e.g. "UITableCell"). Providing nil will reset to default behaviour.
111
+ @param name The custom name that will be used instead of the captured cell title.
112
+ */
113
+ - (void)dtxCustomCellName:(NSString* _Nullable)name;
114
+
115
+ @end
116
+
117
+ /*!
118
+ @category UICollectionViewCell (DynatraceCustomization)
119
+ @abstract Category for changing the instrumentation behaviour of UICollectionViewCells.
120
+ */
121
+ @interface UICollectionViewCell (DynatraceCustomization)
122
+
123
+ /*!
124
+ @brief Sets a custom name for the table cell.
125
+
126
+ The custom name is used instead of the captured cell title. This can be used to customise cell names or hide them for privacy reasons.
127
+ Providing an empty String will use the cell type as name (e.g. "CollectionViewCell"). Providing nil will reset to default behaviour.
128
+ @param name The custom name that will be used instead of the captured cell title.
129
+ */
130
+ - (void)dtxCustomCellName:(NSString* _Nullable)name;
131
+
132
+ @end
133
+
134
+ /*!
135
+ @class DTXAction
136
+ @abstract This class encapsulates a timed mobile action.
137
+ @discussion It creates or extends a mobile action PurePath in Dynatrace. It provides methods to report values,
138
+ events, and errors against actions.
139
+ */
140
+ @interface DTXAction : NSObject
141
+
142
+ /*!
143
+ @brief Get the name of the action.
144
+
145
+ @return Returne the name of the action.
146
+ */
147
+ - (NSString* _Nonnull)getName;
148
+
149
+ /*!
150
+ @brief Set a new name for the currently pending action and the child measurement if available.
151
+
152
+ @param name new name to set
153
+ */
154
+ - (void)setName:(NSString* _Nonnull)name;
155
+
156
+ /*!
157
+ @brief Starts a top level action.
158
+
159
+ The top level action results in a new mobile action PurePath in Dynatrace. An action allows you
160
+ to time an interval in your code. Call this method at the point you want to start timing.
161
+ Call the leaveAction instance method on the returned object at the point you want to stop timing.
162
+
163
+ @param actionName Name of action
164
+
165
+ @return Returns the new action or nil if an error occurs.
166
+ */
167
+ + (DTXAction* _Nullable)enterActionWithName:(NSString* _Nonnull)actionName;
168
+
169
+ /*!
170
+ @brief Starts a child action.
171
+
172
+ The action adds a node to an existing mobile action PurePath in Dynatrace. An action allows you
173
+ to time an interval in your code. Call this method at the point you want to
174
+ start timing. Call the leaveAction instance method on the returned object at the point you want
175
+ to stop timing.
176
+
177
+ @param actionName Name of action
178
+
179
+ @param parentAction The parent action for this action.
180
+
181
+ @return Returns the new action or nil if an error occurs.
182
+ */
183
+ + (DTXAction* _Nullable)enterActionWithName:(NSString* _Nonnull)actionName parentAction:(DTXAction* _Nullable)parentAction;
184
+
185
+ /*!
186
+ @brief Ends an action and computes its interval.
187
+
188
+ All reported events, values, and tagged web requests between start and end of an action are
189
+ nested in the mobile action PurePath. If this action has any child actions, they are ended
190
+ first. Call this method at the end of the code that you wish to time. The number of milliseconds
191
+ since the action began is stored as the interval.
192
+
193
+ In non-ARC code the DTXAction must be released after calling this method.
194
+
195
+ This method doesn't have an effect on auto generated actions.
196
+
197
+ @return Returns a DTX_StatusCode indicating success (DTX_CaptureOn) or failure
198
+ */
199
+ - (DTX_StatusCode)leaveAction;
200
+
201
+ /*!
202
+ @brief Cancels an action so it will not be sent.
203
+
204
+ All reported events, values, and tagged web requests since start of an action are
205
+ not part of the action any more. If this action has any child actions, they are also
206
+ cancelled. Call this method if you started a manual action that you wish to cancel and not be tracked after all.
207
+
208
+ In non-ARC code the DTXAction must be released after calling this method.
209
+
210
+ This method doesn't have an effect on auto generated actions.
211
+
212
+ @return Returns a DTX_StatusCode indicating success (DTX_CaptureOn) or failure
213
+ */
214
+ - (DTX_StatusCode)cancelAction;
215
+
216
+ /*!
217
+ @brief Sends an event to Dynatrace.
218
+
219
+ The event becomes a node of the mobile action PurePath.
220
+
221
+ @param eventName Name of event
222
+
223
+ @return Returns a DTX_StatusCode
224
+ */
225
+ - (DTX_StatusCode)reportEventWithName:(NSString* _Nonnull)eventName;
226
+
227
+ /*!
228
+ @brief Sends a key/value pair to Dynatrace.
229
+
230
+ The value becomes a node of the mobile action PurePath. The value can be processed by a measure and
231
+ thus be charted.
232
+
233
+ @param valueName Name of value
234
+
235
+ @param intValue An integer value associated with the value name
236
+
237
+ @return Returns a DTX_StatusCode
238
+ */
239
+ - (DTX_StatusCode)reportValueWithName:(NSString* _Nonnull)valueName intValue:(int64_t)intValue;
240
+
241
+ /*!
242
+ @brief Sends a key/value pair to Dynatrace.
243
+
244
+ The value becomes a node of the mobile action PurePath. The value can be processed by a measure and
245
+ thus be charted.
246
+
247
+ @param valueName Name of value
248
+
249
+ @param doubleValue A double value associated with the value name
250
+
251
+ @return Returns a DTX_StatusCode
252
+ */
253
+ - (DTX_StatusCode)reportValueWithName:(NSString* _Nonnull)valueName doubleValue:(double)doubleValue;
254
+
255
+ /*!
256
+ @brief Sends a key/value pair to Dynatrace.
257
+
258
+ The value becomes a node of the mobile action PurePath.
259
+
260
+ @param valueName Name of value
261
+
262
+ @param stringValue A string value associated with the value name
263
+
264
+ @return Returns a DTX_StatusCode
265
+ */
266
+ - (DTX_StatusCode)reportValueWithName:(NSString* _Nonnull)valueName stringValue:(NSString* _Nonnull)stringValue;
267
+
268
+ /*!
269
+ @brief Sends an error value to Dynatrace.
270
+
271
+ The error becomes a node of the mobile action PurePath.
272
+
273
+ @param errorName Name of error
274
+
275
+ @param errorValue An integer value associated with the error
276
+
277
+ @return Returns a DTX_StatusCode
278
+ */
279
+ - (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName errorValue:(int)errorValue;
280
+
281
+ /*!
282
+ @brief Sends an exception to Dynatrace.
283
+
284
+ The exception becomes a node of the mobile action PurePath. This can be used to report exceptions
285
+ that are caught and handled.
286
+
287
+ @param errorName Name of error
288
+
289
+ @param exception An exception object that has been caught. The description string of this
290
+ object is sent to the server along with the call stack if one is present.
291
+
292
+ @return Returns a DTX_StatusCode
293
+ */
294
+ - (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName exception:(NSException* _Nonnull)exception;
295
+
296
+ /*!
297
+ @brief Sends an error object to Dynatrace.
298
+
299
+ The error becomes a node of the mobile action PurePath.
300
+
301
+ @param errorName Name of error
302
+
303
+ @param error An error object that has been caught. The error information for this
304
+ object is sent to the server.
305
+
306
+ @return Returns a DTX_StatusCode
307
+ */
308
+ - (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName error:(NSError* _Nonnull)error;
309
+
310
+ /*!
311
+ @brief Sends an error value to Dynatrace.
312
+
313
+ Because this is a class method, the error is not associated with an action. It creates
314
+ its own mobile-only PurePath.
315
+
316
+ @param errorName Name of error
317
+
318
+ @param errorValue An integer value associated with the error
319
+
320
+ @return Returns a DTX_StatusCode
321
+ */
322
+ + (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName errorValue:(int)errorValue;
323
+
324
+ /*!
325
+ @brief Sends an exception to Dynatrace.
326
+
327
+ Because this is a class method, the exception is not associated with an action. It creates
328
+ its own mobile-only PurePath.
329
+
330
+ @param errorName Name of error
331
+
332
+ @param exception An exception object that has been caught. The description string of this
333
+ object is sent to the server along with the call stack if one is present.
334
+
335
+ @return Returns a DTX_StatusCode
336
+ */
337
+ + (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName exception:(NSException* _Nonnull)exception;
338
+
339
+ /*!
340
+ @brief Sends an error object to Dynatrace.
341
+
342
+ Because this is a class method, the error is not associated with an action. It creates
343
+ its own mobile-only PurePath.
344
+
345
+ @param errorName Name of error
346
+
347
+ @param error An error object that has been caught. The error information for this
348
+ object is sent to the server.
349
+
350
+ @return Returns a DTX_StatusCode
351
+ */
352
+ + (DTX_StatusCode)reportErrorWithName:(NSString* _Nonnull)errorName error:(NSError* _Nonnull)error;
353
+
354
+ /*!
355
+ @brief Get the tag for the action by url.
356
+
357
+ @param url URL to get the action for.
358
+
359
+ @return Returns the generated tag string or an empty string if not allowed by url filtering rules or privacy settings.
360
+ */
361
+ - (NSString* _Nullable) getTagForURL: (NSURL* _Nullable)url;
362
+
363
+ @property (readonly) int tagId;
364
+
365
+ @end
366
+
367
+ /*************************************************************************************************/
368
+
369
+ /*!
370
+ @brief Provides the ability to manually tag and time web requests.
371
+
372
+ The DTXWebRequestTiming class provides the ability to manually time web requests.
373
+ */
374
+ @interface DTXWebRequestTiming : NSObject
375
+
376
+ /*!
377
+ @brief Creates a DTXWebRequestTiming object.
378
+
379
+ This method creates an instance of the DTXWebRequestTiming object.
380
+
381
+ @param requestTagString the value of the HTTP header that you must add to your web request. this
382
+ is obtained from the Dynatrace getRequestTagValueForURL method.
383
+
384
+ @param requestUrl the value of the URL for the web request
385
+
386
+ @return Returns the DTXWebRequestTiming object.
387
+ */
388
+ + (DTXWebRequestTiming* _Nullable)getDTXWebRequestTiming:(NSString* _Nonnull)requestTagString requestUrl:(NSURL* _Nullable)requestUrl;
389
+
390
+ /*!
391
+ @brief Manually start timing a web request.
392
+
393
+ The Dynatrace OneAgent automatically times web requests made using NSURLRequest, NSURLConnection,
394
+ NSURLProtocol and NSString. If you use an alternate technology to make
395
+ web requests and want to time them, use the getRequestTagHeader method, adding that information to
396
+ your request, and then this method to start the timing.
397
+
398
+ @return Returns a DTX_StatusCode
399
+ */
400
+ - (DTX_StatusCode)startWebRequestTiming;
401
+
402
+ /*!
403
+ @brief Manually finish timing a web request.
404
+
405
+ @param statusCode the response status code for a successful web request or the error code or error description
406
+ for a failed web request
407
+
408
+ The Dynatrace OneAgent automatically times web requests made using NSURLRequest, NSURLConnection,
409
+ NSURLProtocol and NSString. If you use an alternate technology to make
410
+ web requests and want to time them, use the getRequestTagHeader method, adding that information to
411
+ your request, and then this method to stop the timing and send the information to the mobile action PurePath.
412
+
413
+ @return Returns a DTX_StatusCode
414
+ */
415
+ - (DTX_StatusCode)stopWebRequestTiming:(NSString* _Nullable)statusCode;
416
+
417
+ @end
418
+
419
+ /*************************************************************************************************/
420
+
421
+
422
+ /*!
423
+ @brief DTXUserPrivacyOptions protocol should be implemented by objects passed to applyUserPrivacyOptions:completion: method.
424
+ @property crashReportingOptedIn current privacy setting for crash reporting
425
+ @property dataCollectionLevel the current data collection level.
426
+ */
427
+
428
+ @protocol DTXUserPrivacyOptions <NSObject>
429
+ @required
430
+ @property (nonatomic) BOOL crashReportingOptedIn;
431
+ @property (nonatomic) BOOL crashReplayOptedIn;
432
+ @property (nonatomic) DTX_DataCollectionLevel dataCollectionLevel;
433
+ @end
434
+
435
+
436
+ /*!
437
+ @brief Provides for startup and shutdown of the Dynatrace OneAgent.
438
+
439
+ The Dynatrace class provides the ability to startup, shutdown, and control other global
440
+ attributes of the Dynatrace OneAgent.
441
+ */
442
+ @interface Dynatrace : NSObject
443
+
444
+ /*!
445
+ @brief Initializes the Dynatrace OneAgent. This is deprecated! Please use (DTX_StatusCode)startupWithConfig:(NSDictionary*)config instead.
446
+
447
+ This must be invoked before any Events can be captured. Multiple calls to this method are
448
+ ignored if the OneAgent is not shut down between them.
449
+
450
+ This method will be called automatically if you specify the value DTXAgentStartupPath in
451
+ your application's Info.plist file. The parameter descriptions below specify the info.plist value
452
+ to use to specify each parameter value when using auto-start.
453
+
454
+ @param applicationName A user-defined name for the application. (Info.plist value
455
+ DTXApplicationID)
456
+
457
+ @param serverURL The URL of the web server with an active Dynatrace UEM agent
458
+ (eg: "http://myhost.mydomain.com:8080/agentLocation/"). The URL scheme dictates whether the OneAgent
459
+ uses http or https. The URL must contain the agent location specified in the Dynatrace UEM settings
460
+ for this application. (Info.plist value DTXAgentStartupPath)
461
+
462
+ @param allowAnyCert Allow any certificate for https communication. This is only evaluated if
463
+ the https transport mechanism is specified in the server name. (Info.plist value
464
+ DTXAllowAnyCert)
465
+
466
+ @param pathToCertificateAsDER Path to a (self-signed) certificate in DER format or nil. Adds a
467
+ certificiate in DER format which is used as an additional anchor to validate https communication.
468
+ This is needed if allowAnyCert is NO and a self-signed certificate is used on the server. You can
469
+ retrieve the path for a file in your application bundle using code like this:
470
+
471
+ <tt>
472
+ NSString *pathToCertificateAsDER =
473
+ [[NSBundle mainBundle] pathForResource:\@"myAppCert" ofType:\@"der"];
474
+ </tt>
475
+
476
+ (Info.plist value DTXAgentCertificatePath)
477
+
478
+ @return Returns a DTX_StatusCode
479
+ */
480
+ + (DTX_StatusCode)startupWithApplicationName:(NSString* _Nonnull)applicationName
481
+ serverURL:(NSString* _Nonnull)serverURL
482
+ allowAnyCert:(BOOL)allowAnyCert
483
+ certificatePath:(NSString* _Nullable)pathToCertificateAsDER __deprecated_msg("Please use (DTX_StatusCode)startupWithConfig:(NSDictionary*)config instead");
484
+
485
+ /*!
486
+ @brief Initializes the Dynatrace OneAgent.
487
+
488
+ This must be invoked before any Events can be captured. Multiple calls to this method are
489
+ ignored if the OneAgent is not shut down between them.
490
+
491
+ This method will be called automatically if you specify the value DTXAgentStartupPath in
492
+ your application's info.plist file. This method has no paramaters. It uses the paramaters specified in info.plist.
493
+
494
+
495
+ @return Returns a DTX_StatusCode
496
+ */
497
+ + (DTX_StatusCode)startupWithInfoPlistSettings;
498
+
499
+ /*!
500
+ @brief Initializes the Dynatrace OneAgent.
501
+
502
+ @param config A dictionary with key/value pairs similar to the ones in the project's Info.plist file.
503
+
504
+ @discussion An overview of all possible key/value pairs can be found on the start page under "Constants"
505
+
506
+ @return Returns a DTX_StatusCode
507
+ */
508
+ + (DTX_StatusCode)startupWithConfig:(NSDictionary<NSString*,id>* _Nonnull)config;
509
+
510
+ /*!
511
+ @brief Stops Dynatrace monitoring and flushes all collected data to the server.
512
+
513
+ @return Returns a DTX_StatusCode
514
+ */
515
+ + (DTX_StatusCode)shutdown;
516
+
517
+ /*!
518
+ @brief Identify a user.
519
+
520
+ The current session will be tagged with the provided userId. The userId needs to be set again on application restart.
521
+
522
+ @param userId to tag the session with. If userId = nil or empty the user tag will be removed from the session.
523
+
524
+ @return Returns a DTX_StatusCode
525
+ */
526
+ + (DTX_StatusCode)identifyUser:(NSString* _Nullable)userId;
527
+
528
+ /*!
529
+ @brief Identify a user. This method is deprecated! Parameter parentAction is being ignored! Please use (DTX_StatusCode)identifyUser:(NSString*)userId instead.
530
+
531
+ The current session will be tagged with the provided userId. The userId needs to be set again on application restart.
532
+
533
+ @param userId to tag the session with. If userId = nil or empty the user tag will be removed from the session.
534
+
535
+ @param parentAction The parent action for the user identify. This parameter is being ignored!
536
+
537
+ @return Returns a DTX_StatusCode
538
+ */
539
+ + (DTX_StatusCode)identifyUser:(NSString* _Nullable)userId parentAction:(DTXAction* _Nullable)parentAction __deprecated_msg("Please use (DTX_StatusCode)identifyUser:(NSString*)userId instead. Parameter '(DTXAction*)parentAction' is being ignored.");
540
+
541
+ /*!
542
+ @brief Allows to modify the currently pending user action.
543
+
544
+ If there is no user action pending or if it is already closed upon modification, no modification takes place.
545
+
546
+ @param modifier block which is applied to the currently pending user action.
547
+ */
548
+ + (void)modifyUserAction:(void(^ _Nullable)(DTXAction* _Nullable modifiableAction))modifier;
549
+
550
+ /*!
551
+ @brief Set the current GPS location of the user.
552
+
553
+ The Dynatrace library does not automatically collect location information. If the
554
+ developer wants location information to be transmitted to Dynatrace, then this function should
555
+ be used to provide it.
556
+
557
+ @param gpsLocation CLLocation object with GPS coordinates aquired by customer application
558
+
559
+ @return Returns a DTX_StatusCode indicating current uem capture status (if the OneAgent is not
560
+ capturing no GPS location is set)
561
+ */
562
+ + (DTX_StatusCode)setGpsLocation:(CLLocation* _Nonnull)gpsLocation;
563
+
564
+ /*!
565
+ @brief Provides information regarding internal errors.
566
+
567
+ Use this to obtain the error code associated with the most recent DTX_Error_InternalError or
568
+ enterActionWithName.
569
+
570
+ @return Returns the error code or 0 if there is no error.
571
+ */
572
+ + (int)lastErrorCode;
573
+
574
+ /*!
575
+ @brief Provides a string describing internal errors.
576
+
577
+ Use this to obtain the error message associated with most recent DTX_Error_InternalError.
578
+
579
+ @return Returns the error message or nil if there is no error.
580
+ */
581
+ + (NSString* _Nullable)lastErrorMsg;
582
+
583
+ /*!
584
+ @brief Send all collected events immediately.
585
+
586
+ To reduce network traffic/usage the collected events are usually sent in packages where the oldest
587
+ event has an age of up to 9 minutes. Using this method you can force sending of all collected
588
+ events regardless of their age.
589
+
590
+ @return Returns a DTX_StatusCode
591
+ */
592
+ + (DTX_StatusCode)flushEvents;
593
+
594
+ /*!
595
+ @brief Enable Dynatrace crash reporting.
596
+
597
+ The Dynatrace OneAgent can report on application crashes using the KSCrash framework. Call this
598
+ method after startup to enable crash reporting to the Dynatrace server.
599
+
600
+ When using auto-start use the Info.plist value DTXCrashReportingEnabled to control whether this
601
+ method is invoked automatically. You must disable the automatic invocation of this method if
602
+ you wish to use one of the following methods to enable third party crash reporting.
603
+
604
+ @param sendCrashReport YES to send complete crash report to Dynatrace server. NO to
605
+ send only minimal information.
606
+
607
+ @return Returns a DTX_StatusCode
608
+ */
609
+ + (DTX_StatusCode)enableCrashReportingWithReport:(BOOL)sendCrashReport;
610
+
611
+ /*!
612
+ @brief Sets a dictionary of custom headers to be included in all OneAgent data transmissions.
613
+
614
+ The Dynatrace OneAgent sends data to the server via HTTP or HTTPS. If your infrastructure requires
615
+ custom headers to be added to HTTP requests in order for them to pass you can use this method to provide
616
+ them. This method needs to be called as early as possible to ensure that the headers are available for the first communication with the server.
617
+ It can be called again later to change or to remove the headers.
618
+
619
+ @param beaconHeaders The headers dictionary. Pass nil to remove all headers from future requests.
620
+ The headers will be inspected for invalid or not allowed values.
621
+ Limitations:
622
+ - max number of headers: 10
623
+ - max header len: 4096 bytes
624
+ - max total size: 8192 bytes
625
+
626
+ @return YES if the headers where successfully set, NO otherwise.
627
+ */
628
+ + (BOOL)setBeaconHeaders:(NSDictionary<NSString*,NSString*>* _Nullable)beaconHeaders;
629
+
630
+ /**
631
+ @return the dictionary of custom headers that was set with setBeaconHeaders: method
632
+ */
633
+ + (NSDictionary<NSString*,NSString*>* _Nullable)beaconHeaders;
634
+
635
+ /**
636
+ In order to receive notifications about the network errors occurred in the agent
637
+ subscribe to the notification center using this as name.
638
+
639
+ e.g.: [[NSNotificationCenter defaultCenter] addObserverForName:[Dynatrace getCommunicationProblemNotificationName] ... ];
640
+ */
641
+ + (NSString* _Nonnull)getCommunicationProblemNotificationName;
642
+
643
+ /*!
644
+ @brief Returns the HTTP header to use for manual web request tagging.
645
+
646
+ The Dynatrace OneAgent automatically tags web requests made using NSURLRequest, NSURLConnection,
647
+ NSURLProtocol and NSString. If you use an alternate technology to make
648
+ web requests and want them to appear nested in a mobile action PurePath use this method and the
649
+ getRequestTagValue method to retrieve the HTTP header and its value. Adding that information to
650
+ your request will include it in the PurePath.
651
+
652
+ @return Returns the name of the HTTP header that you must add to your web request.
653
+ */
654
+ + (NSString* _Nonnull)getRequestTagHeader;
655
+
656
+ /*!
657
+ @brief Returns the HTTP header value to use for manual web request tagging.
658
+
659
+ The Dynatrace OneAgent automatically tags web requests made using NSURLRequest, NSURLConnection,
660
+ NSURLProtocol and NSString. If you use an alternate technology to make
661
+ web requests and want them to appear nested in a mobile action PurePath use this method and the
662
+ getRequestTagHeader method to retrieve the HTTP header and its value. Adding that information to
663
+ your request will include it in the PurePath.
664
+
665
+ @param url The NSURL for the web request.
666
+
667
+ @return Returns the value of the HTTP header that you need to add to your web request. An empty string is returned if request tagging not allowed by url filtering rules or privacy settings.
668
+ */
669
+ + (NSString* _Nullable)getRequestTagValueForURL:(NSURL* _Nullable)url;
670
+
671
+ /*!
672
+ @brief Returns the current data collection level. This method will always return DTX_DataCollectionUserBehavior when the user optin feature is not used.
673
+
674
+ @return current data collection level
675
+ */
676
+ + (DTX_DataCollectionLevel)dataCollectionLevel __deprecated_msg("use userPrivacyOptions API");
677
+
678
+ /*!
679
+ @brief Allows the user to set the data collection level and stores the users decisions for future sessions.
680
+
681
+ This method does not store the settings when the user optin feature is not used.
682
+ When the user changes the data collection level a new session will be started.
683
+
684
+ @param dataCollectionLevel new data collection level
685
+
686
+ @param completion callback that is executed when switching to the new data collection level is finished
687
+ */
688
+ + (void)setDataCollectionLevel:(DTX_DataCollectionLevel)dataCollectionLevel completion:(void(^ _Nullable)(BOOL successful))completion __deprecated_msg("use userPrivacyOptions API");
689
+
690
+ /*!
691
+ @brief Returns the current privacy setting for crash reporting. This method will always return YES, when the user optin feature is not used.
692
+
693
+ @return current privacy setting for crash reporting
694
+ */
695
+ + (BOOL)crashReportingOptedIn __deprecated_msg("use userPrivacyOptions API");
696
+
697
+ /*!
698
+ @brief Allows the user to activate/deactivate crash reporting and stores the users decisions for future sessions.
699
+
700
+ This method does not store the settings when the user optin feature is not used.
701
+ @param optedIn YES, if crash reporting is confirmed by the user
702
+ */
703
+ + (void)setCrashReportingOptedIn:(BOOL)optedIn __deprecated_msg("use userPrivacyOptions API");
704
+
705
+ /*!
706
+ @brief Ends the visit for Dynatrace and starts a new session.
707
+
708
+ This method creates its own mobile-only PurePath.
709
+
710
+ @return Returns a DTX_StatusCode
711
+ */
712
+ + (DTX_StatusCode)endVisit;
713
+
714
+ /*!
715
+ @brief Returns an object containig privacy options that can be made available to the application user.
716
+
717
+ When the user optin feature is not used:
718
+ - all the BOOL options default to YES.
719
+ - dataCollection level defaults to: DTX_DataCollectionUserBehavior
720
+ */
721
+ + (id<DTXUserPrivacyOptions> _Nonnull)userPrivacyOptions;
722
+
723
+ /*!
724
+ @brief Allows the user to activate/deactivate various privacy options. This are detailed in the DTXUserPrivacyOptions protocol declaration
725
+
726
+ @param completion callback that is executed when applying the new option is completed. (Can be ommited but its higly recommendable to be used. In best case scenario the application should wait for it.)
727
+ */
728
+ + (void)applyUserPrivacyOptions:(id<DTXUserPrivacyOptions> _Nonnull)userOptions completion:(void(^ _Nullable)(BOOL successful))completion;
729
+
730
+ @end
731
+ #endif
732
+
733
+ # pragma mark - Configuration Keys
734
+
735
+ # pragma mark Logging
736
+ /*!
737
+ @const kDTXLogLevel
738
+ If this key is present with a valid value (ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF),
739
+ the OneAgent logging level will be set to this value. If a key isn't present or doesn't have a valid value,
740
+ logging will default to INFO.
741
+ */
742
+ extern NSString *_Nonnull const kDTXLogLevel;
743
+
744
+ # pragma mark Agent Setup
745
+ /*!
746
+ @const kDTXApplicationID
747
+ This key’s value is used by Dynatrace to identify your mobile app. Auto-instrumentation issues an error if the key isn't present.
748
+ */
749
+ extern NSString *_Nonnull const kDTXApplicationID;
750
+
751
+ /*!
752
+ @const kDTXAgentStartupPath (Appmon)
753
+ If this key is present with a valid value, the Mobile Agent starts automatically and using this value as the serverUrl name.
754
+ It ignores any manual startup calls in your app. serverUrl must start with the transport mechanism to use (http:// or https://).
755
+ */
756
+ extern NSString *_Nonnull const kDTXAgentStartupPath;
757
+
758
+ /*!
759
+ @const kDTXBeaconURL (Dynatrace)
760
+ The beacon URL as specified by the mobile application settings in the Dynatrace webUI.
761
+ This value needs to begin with the transport mechanism to be used (http:// or https://).
762
+ */
763
+ extern NSString *_Nonnull const kDTXBeaconURL;
764
+
765
+ /*!
766
+ @const kDTXAgentCertificatePath
767
+ This key defines the path to a (self-signed) certificate in DERformat, which is used as an additional anchor
768
+ to validate HTTPS communication. This key is needed if DTXAllowAnyCert is false and a self-signed certificate
769
+ is used on the server. The default value is null.
770
+ */
771
+ extern NSString *_Nonnull const kDTXAgentCertificatePath;
772
+
773
+ /*!
774
+ @const kDTXAllowAnyCert
775
+ If set to true, self signed certificates are accepted.
776
+ If set to false, valid certificates from known certificate authorities are accepted. The default value is false.
777
+ */
778
+ extern NSString *_Nonnull const kDTXAllowAnyCert;
779
+
780
+ /*!
781
+ @const kDTXStartupLoadBalancing
782
+ This key enables agent-side load balancing on startup. By default, this is set to false. When set to true, this enables agent-side load balancing, which avoids unbalanced load on the server when multiple OneAgents simultaneously establish a connection to the ActiveGate. If OneAgent is used as a beacon endpoint in place of an ActiveGate, this configuration key requires OneAgent version 1.195+.
783
+ @note This key is available as of OneAgent for iOS 8.203.
784
+ */
785
+ extern NSString *_Nonnull const kDTXStartupLoadBalancing;
786
+
787
+ /*!
788
+ @const kDTXAutoStart
789
+ When set to false, the agent does not start automatically and must be started by either calling startupWithInfoPlistSettings to start with the configuration from Info.plist or startupWithConfig to start with the passed configuration dictionary. Configuration keys for the dictionary are the ones listed in this header file. The default value is true.
790
+ */
791
+ extern NSString *_Nonnull const kDTXAutoStart;
792
+
793
+ /*!
794
+ @const kDTXHybridApplication
795
+ The default value is false. Set the value to true if you have a Hybrid application.
796
+ This is necessary to share the same visit for user actions created by the JavaScript agent.
797
+ */
798
+ extern NSString *_Nonnull const kDTXHybridApplication;
799
+
800
+ /*!
801
+ @const kDTXSetCookiesForDomain
802
+ For hybrid apps that use the JavaScript library, cookies must be set for each instrumented domain or server that the app communicates with. You can specify domains, host, or IP addresses. Domains and sub-domains must start with a dot.
803
+ */
804
+ extern NSString *_Nonnull const kDTXSetCookiesForDomain;
805
+
806
+ /*!
807
+ @const kDTXCrashReportingEnabled
808
+ Set the value to false if you want to disable crash reporting. The default value is true.
809
+ */
810
+ extern NSString *_Nonnull const kDTXCrashReportingEnabled;
811
+
812
+ /*!
813
+ @const kDTXSendCrashReports
814
+ Corresponds to the sendCrashReport parameter for enableCrashReportingwithReport to send crash reports to the AppMon Server.
815
+ Set the key to false if you do not want to send crash reports. The default value is true.
816
+ */
817
+ extern NSString *_Nonnull const kDTXSendCrashReports;
818
+
819
+ # pragma mark Privacy Opt-In
820
+ /*!
821
+ @const kDTXUserOptIn
822
+ If set to true, privacy mode is activated and user consent needs to be queried and set.
823
+ The privacy settings for data collection and crash reporting can be changed via the OneAgent SDK for Mobile like described in Data privacy.
824
+ The default value is false.
825
+ https://www.dynatrace.com/support/help/user-experience/mobile-apps/how-do-i-enrich-mobile-user-experience-data-via-the-oneagent-sdk-for-mobile/#anchor_privacy
826
+ */
827
+ extern NSString *_Nonnull const kDTXUserOptIn;
828
+
829
+ # pragma mark Instrumentation - GPS
830
+ /*!
831
+ @const kDTXInstrumentGPSLocation
832
+ The location is captured only if the app uses CLLocationManager and sends the captured location as a metric to the server.
833
+ OneAgent for iOS doesn't perform GPS location capturing on its own. Set the value to false to disable OneAgent
834
+ for iOS location capturing. The default value is true.
835
+ */
836
+ extern NSString *_Nonnull const kDTXInstrumentGPSLocation;
837
+
838
+ # pragma mark Instrumentation - Lifecycle
839
+ /*!
840
+ @const kDTXInstrumentLifecycleMonitoring
841
+ Automatic lifecycle detection is enabled without the need to override your view controller classes with the OneAgent
842
+ for iOS lifecycle classes. Set the value to false to disable automatic lifecycle monitoring. The default value is true.
843
+ */
844
+ extern NSString *_Nonnull const kDTXInstrumentLifecycleMonitoring;
845
+
846
+ /*!
847
+ @const kDTXExcludedLifecycleClasses
848
+ An array of items where each item contains the name of a class to exclude from automatic lifecycle instrumentation.
849
+ Each item in the array is a case-sensitive string that must exactly match the name of the class to be excluded.
850
+ */
851
+ extern NSString *_Nonnull const kDTXExcludedLifecycleClasses;
852
+
853
+ # pragma mark Instrumentation - Auto User Actions (control touches)
854
+ /*!
855
+ @const kDTXInstrumentAutoUserAction
856
+ The default value is true. Turns on the ability to automatically create user actions for user interactions with the app,
857
+ such as button clicks. Set the value to false to disable automatic creation of user actions.
858
+ */
859
+ extern NSString *_Nonnull const kDTXInstrumentAutoUserAction;
860
+
861
+ /*!
862
+ @const kDTXAutoActionTimeoutMilliseconds
863
+ The default value is 500 ms. Sets the value for how long a particular automatic user action is active.
864
+ The purpose is to catch all web requests that happen when an automatic user action is active.
865
+ If the automatic user action has completed web requests, OneAgent leaves the action at the end of this time.
866
+ The minimum allowed value is 100 ms, the maximum allowed value is 5000 ms (five seconds).
867
+ */
868
+ extern NSString *_Nonnull const kDTXAutoActionTimeoutMilliseconds;
869
+
870
+ /*!
871
+ @const kDTXAutoActionMaxDurationMilliseconds
872
+ The default value is 60000 ms (60 seconds). Sets the amount of time to retain an automatic user action before deletion.
873
+ The purpose is to catch all web requests that occur when an automatic user action is active.
874
+ If an automatic user action has pending web requests that are taking a long time to complete,
875
+ OneAgent waits for this amount of time for the web requests to complete before leaving the user action.
876
+ The minimum allowed value is 100 ms, the maximum allowed value is 540000 ms (nine minutes).
877
+ */
878
+ extern NSString *_Nonnull const kDTXAutoActionMaxDurationMilliseconds;
879
+
880
+ /*!
881
+ @const kDTXSendEmptyAutoAction
882
+ Determines whether to send automatic user actions that don't contain any web requests or lifecycle actions.
883
+ The default value is true.
884
+ */
885
+ extern NSString *_Nonnull const kDTXSendEmptyAutoAction;
886
+
887
+ /*!
888
+ @const kDTXExcludedControls
889
+ Defines an array of items where each item contains a type of view or control to exclude from automatic creation
890
+ of user actions. Each item in the array is a case-insensitive string. Possible values are Button, DatePicker, Slider, Stepper,
891
+ Switch, RefreshControl, ToolBar, SegmentedControl, TableView, TabBar, AlertView, AlertAction, PageView, NavigationController,
892
+ CollectionView, Gesture, and ActionSheet.
893
+ */
894
+ extern NSString *_Nonnull const kDTXExcludedControls;
895
+
896
+ /*!
897
+ @const kDTXExcludedControlClasses
898
+ An array of items where each item contains the name of a UI control (sub-)class to exclude from automatic instrumentation.
899
+ Each item in the array is a case-sensitive string that must exactly match the name of the class to be excluded.
900
+ */
901
+ extern NSString *_Nonnull const kDTXExcludedControlClasses;
902
+
903
+ # pragma mark Instrumentation - Web Requests
904
+ /*!
905
+ @const kDTXInstrumentWebRequestTiming
906
+ The default value is true, which turns on automatic web request timing. Set the value to false to disable automatic
907
+ web request timing. Note that webRequestTagging is enabled if webRequestTiming is enabled, because it's a dependency.
908
+ */
909
+ extern NSString *_Nonnull const kDTXInstrumentWebRequestTiming;
910
+
911
+ /*!
912
+ @const kDTXFilterURLProtocolDuplicates
913
+ This key is required if NSURLProtocol subclassing is used and duplicate web requests may appear. The default value is false.
914
+ @note This key is available as of OneAgent for iOS 8.172 and 7.2.6.
915
+ */
916
+ extern NSString *_Nonnull const kDTXFilterURLProtocolDuplicates;
917
+
918
+ /*!
919
+ @const kDTXInstrumentWebViewTiming
920
+ Detects and times web requests that originate from web views in your app. Set the value to false to disable
921
+ automatic detection and timing of web view web requests. The default value is true.
922
+ */
923
+ extern NSString *_Nonnull const kDTXInstrumentWebViewTiming;
924
+
925
+ /*!
926
+ @const kDTXWebViewStandInDelegate
927
+ Use different instrumentation mode for WebView delegates to prevent circular instrumentation on delegate switching involving a subclass. The default value is false.
928
+ @note This key is available as of OneAgent for iOS 8.175 and 7.2.7.
929
+ */
930
+ extern NSString *_Nonnull const kDTXWebViewStandInDelegate;
931
+
932
+ /*!
933
+ @const kDTXURLFilters
934
+ Provide an array of url strings or regex expressions to filter out web requests that should not be monitored.
935
+ @note This key is available as of OneAgent for iOS 8.219.
936
+ */
937
+ extern NSString *_Nonnull const kDTXURLFilters;
938
+
939
+ # pragma mark Instrumentation - Detect Rage Taps
940
+ /*!
941
+ @const kDTXDetectRageTaps
942
+ If set to true, rage taps on the screen will be detected, signaling a user frustration while using the app.
943
+ Set the value to false to turn off automatic detection. The default value is true.
944
+ */
945
+ extern NSString *_Nonnull const kDTXDetectRageTaps;
946
+
947
+ # pragma mark Instrumentation - 3rd Party Frameworks
948
+ /*!
949
+ @const kDTXInstrumentFrameworks
950
+ Flag to force the agent to also look for viewControllers inside the frameworks linked with the application
951
+ */
952
+ extern NSString *_Nonnull const kDTXInstrumentFrameworks;