@dynatrace/react-native-plugin 2.255.1 → 2.257.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.
Files changed (88) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +41 -16
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridge.java +74 -21
  5. package/files/plugin.gradle +1 -1
  6. package/ios/DynatraceRNBridge.h +2 -2
  7. package/ios/DynatraceRNBridge.m +38 -17
  8. package/ios/lib/Dynatrace.xcframework/Info.plist +10 -10
  9. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
  10. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +46 -1
  11. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +3 -3
  12. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Info.plist +0 -0
  13. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  14. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.abi.json +21 -0
  15. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.private.swiftinterface +9 -0
  16. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  17. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftinterface +4 -2
  18. package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/module.modulemap +2 -2
  19. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  20. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace-Swift.h +82 -2
  21. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +3 -3
  22. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  23. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  24. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  25. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json +21 -0
  26. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +9 -0
  27. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  28. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -2
  29. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +21 -0
  30. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +9 -0
  31. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  32. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +4 -2
  33. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +2 -2
  34. package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +61 -65
  35. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
  36. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +46 -1
  37. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +3 -3
  38. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Info.plist +0 -0
  39. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos.swiftsourceinfo +0 -0
  40. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.abi.json +21 -0
  41. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.private.swiftinterface +9 -0
  42. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftdoc +0 -0
  43. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftinterface +3 -1
  44. package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/module.modulemap +2 -2
  45. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
  46. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace-Swift.h +82 -2
  47. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +3 -3
  48. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
  49. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo +0 -0
  50. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo +0 -0
  51. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json +21 -0
  52. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.private.swiftinterface +9 -0
  53. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftdoc +0 -0
  54. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftinterface +3 -1
  55. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json +21 -0
  56. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.private.swiftinterface +9 -0
  57. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftdoc +0 -0
  58. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface +3 -1
  59. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +2 -2
  60. package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +67 -23
  61. package/lib/instrumentor/DynatraceInstrumentation.js +1 -1
  62. package/lib/instrumentor/base/Dynatrace.js +48 -31
  63. package/lib/instrumentor/base/DynatraceAction.js +44 -0
  64. package/lib/instrumentor/base/DynatraceInternal.js +25 -0
  65. package/lib/instrumentor/base/DynatraceRootAction.js +38 -0
  66. package/lib/instrumentor/base/DynatraceWebRequestTiming.js +37 -0
  67. package/lib/instrumentor/base/ElementHelper.js +3 -2
  68. package/lib/instrumentor/base/ErrorHandler.js +2 -1
  69. package/lib/instrumentor/base/NullAction.js +8 -0
  70. package/lib/instrumentor/base/NullRootAction.js +10 -0
  71. package/lib/instrumentor/base/NullWebRequestTiming.js +15 -0
  72. package/lib/instrumentor/base/Picker.js +1 -1
  73. package/lib/instrumentor/base/RefreshControl.js +1 -1
  74. package/lib/instrumentor/base/Touchable.js +11 -7
  75. package/lib/instrumentor/base/configuration/AutoStartupConfiguration.js +4 -0
  76. package/lib/instrumentor/base/configuration/Configuration.js +1 -0
  77. package/lib/instrumentor/base/configuration/ConfigurationDefaults.js +4 -2
  78. package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +5 -5
  79. package/lib/instrumentor/base/{interface → configuration/interface}/IAutoConfiguration.js +0 -0
  80. package/lib/instrumentor/base/configuration/interface/IManualConfiguration.js +3 -0
  81. package/lib/instrumentor/base/interface/IDynatraceInternal.js +2 -0
  82. package/lib/instrumentor/base/interface/IDynatraceRootAction.js +2 -0
  83. package/lib/instrumentor/base/interface/IWebRequestTiming.js +1 -0
  84. package/lib/instrumentor/base/util/StringUtils.js +1 -0
  85. package/lib/react/Component.js +3 -3
  86. package/package.json +5 -3
  87. package/react-native-dynatrace.podspec +3 -2
  88. package/typings/react-native-dynatrace.d.ts +242 -110
@@ -76,154 +76,205 @@ export declare interface JSONObject {
76
76
  }
77
77
 
78
78
  export declare const Dynatrace: {
79
-
80
79
  /**
81
- * Starting the whole plugin and agent manually
82
- * @param configuration Configuration of the manual startup
80
+ * Starting the React Native plugin and OneAgent for Android or iOS. This method is only necessary
81
+ * in case of manual startup and will be ignored in auto startup scenarios. The start method will
82
+ * set the error handler for reporting crashes and will apply the provided configuration globally.
83
+ *
84
+ * @param {ManualStartupConfiguration} configuration Configuration for a manual startup of the plugin
83
85
  */
84
86
  start(configuration: ManualStartupConfiguration): Promise<void>;
85
87
 
86
88
  /**
87
- * Monitor your functional or class component manually. This call is wrapping the component and
88
- * will report data for renderings.
89
- * @param Component Functional or class component
90
- * @param name The name that should be used for reporting the component. This is important because
91
- * minification will remove the function name. Still is optional as other properties can be used as well.
89
+ * This call allows to monitor the passed in component. Depending on the type of the component
90
+ * (Function Component or Class Component), it will be wrapped and data of renderings will be
91
+ * automatically reported.
92
+ *
93
+ * The name of the Component, which can be passed as parameter, is important because the build
94
+ * process will remove the name of a Functional Component. Still this parameter is optional as
95
+ * other properties can be used at runtime as well (e.g. dtActionName).
96
+ *
97
+ * @param Component Functional or Class Component
98
+ * @param {string} name The name of the Component
99
+ * @returns The Component which was wrapped to be monitored
92
100
  */
93
101
  withMonitoring(Component: React.FunctionComponent<any> | React.ComponentClass<any>, name?: string): React.FunctionComponent<any> | React.ComponentClass<any>
94
102
 
95
103
  /**
96
- * Enter an action
97
- * @param {string} actionName - name of action
98
- * @param {Platform} platform - if empty default is both platforms
99
- * @return id of created action
104
+ * Creates an Action which will be automatically handled by the plugin. This means that the
105
+ * plugin decides about the hierachy of this action. If there is no open action, the following
106
+ * action will be a root action. All other actions created by this method, while a root action
107
+ * is open, will be automatically inserted as a child action. Furthermore the plugin will automatically
108
+ * link webrequest (if they are not tagged manually) to the open root action.
109
+ *
110
+ * @deprecated Please use either {@link enterAutoAction}, which is doing the same or alternatively {@link enterManualAction}.
111
+ *
112
+ * @param {string} name Name of the action, which will be created. This name must not be empty.
113
+ * @param {Platform} platform Optional, which means this call will be applied on both platforms (Android & iOS).
114
+ * @returns {IDynatraceAction} Action that is created. If name was empty a NullAction will be provided, which will act as normal action,
115
+ * but has no functionality.
100
116
  */
101
- enterAction(name: string, platform?: Platform): DynatraceAction;
117
+ enterAction(name: string, platform?: Platform): IDynatraceAction;
102
118
 
103
119
  /**
104
- * End a session
105
- * @param {Platform} platform - if empty default is both platforms
120
+ * Can be called to end the current visit and start a new visit. All current actions are
121
+ * closed and sent to the server.
122
+ *
123
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
106
124
  */
107
125
  endSession(platform?: Platform): void;
108
126
 
109
127
  /**
110
- * Identify the session with a user string
111
- * @param {string} user - username which should be used for the session
112
- * @param {Platform} platform - if empty default is both platforms
128
+ * The current visit/session will be tagged with the provided user id.
129
+ * The value will not be stored and has to be renewed for every new session.
130
+ *
131
+ * @param {string} user a unique id that allows you to identify the current user.
132
+ * If user is null or empty, then the user tag will be removed from the session.
133
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
113
134
  */
114
135
  identifyUser(user: string, platform?: Platform): void;
115
136
 
116
137
  /**
117
- * Set the GPS Location of the device
118
- * @param {Number} latitude - latitude of the position
119
- * @param {Number} longitude - longitude of the position
120
- * @param {Platform} platform - if empty default is both platforms
138
+ * Saves the given GPS location for reporting along with the captured data.
139
+ *
140
+ * @param {Number} latitude latitude data of the position
141
+ * @param {Number} longitude longitude data of the position
142
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
121
143
  */
122
144
  setGPSLocation(latitude: Number, longitude: Number, platform?: Platform): void;
123
145
 
124
146
  /**
125
- * Flush all events in db
126
- * @param {Platform} platform - if empty default is both platforms
147
+ * Call this function to flush all collected events immediately. To reduce network chatter, the collected events are usually
148
+ * sent in packages where the oldest event has an age of up to 2 minutes (the default; the maximum age can be configured).
149
+ * Using this function, you can force sending of all collected events regardless of their age.
150
+ *
151
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
127
152
  */
128
153
  flushEvents(platform?: Platform): void;
129
154
 
130
155
  /**
131
- * Returns boolean value which tells you if crash reporting is turned on
132
- * @deprecated Replaced by getUserPrivacyOptions
133
- * @param {Platform} platform - if empty default is both platforms
134
- * @returns promise which resolves a boolean
156
+ * Tells you if you opted into crash reporting. If this value is false, which means off,
157
+ * the native agent will not report a single crash that is happening within the application.
158
+ * This method will always return true, when the user optin feature is not used.
159
+ *
160
+ * @deprecated Please use {@link getUserPrivacyOptions} to get the crash reporting opt-in value.
161
+ *
162
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
163
+ * @returns {Promise<boolean>} Promise which resolves true if crash reporting is opted in.
135
164
  */
136
165
  isCrashReportingOptedIn(platform?: Platform): Promise<boolean>;
137
166
 
138
167
  /**
139
- * Set if crash reporting should be enabled or disabled
140
- * @deprecated Replaced by applyUserPrivacyOptions
141
- * @param {boolean} crashReporting - true => crash reporting enabled
142
- * @param {Platform} platform - if empty default is both platforms
168
+ * Allows the user to activate/deactivate crash reporting and stores the users decisions for future sessions.
169
+ * This method can only be used, when the configuration (dynatrace.config.js) for android or iOS is using the userOptIn mode.
170
+ *
171
+ * @deprecated Please use {@link applyUserPrivacyOptions} to set crash reporting opt-in.
172
+ *
173
+ * @param {boolean} crashReporting Pass true, if you want to enable crash reporting
174
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
143
175
  */
144
176
  setCrashReportingOptedIn(crashReporting: boolean, platform?: Platform): void;
145
177
 
146
178
  /**
147
- * Get the current data collection level (Off, Performance, UserBehavior)
148
- * @deprecated Replaced by getUserPrivacyOptions
149
- * @param {Platform} platform - if empty default is both platforms
179
+ * Returns the current {@link DataCollectionLevel} which is used by the plugin. This method will always
180
+ * return {@link DataCollectionLevel.UserBehavior}, when the user opt-in feature is not used.
181
+ *
182
+ * @deprecated Please use {@link getUserPrivacyOptions} to get the current data collection level value.
183
+ *
184
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
150
185
  * @returns promise which resolve a data collection level string
151
186
  */
152
187
  getDataCollectionLevel(platform?: Platform): Promise<DataCollectionLevel>;
153
188
 
154
189
  /**
155
- * Set the data collection level (Off, Performance, UserBehavior)
156
- * @deprecated Replaced by applyUserPrivacyOptions
157
- * @param {DataCollectionLevel} dataCollectionLevel - Off, Performance, UserBehavior
158
- * @param {Platform} platform - if empty default is both platforms
190
+ * Allows the user to set the {@link DataCollectionLevel} and stores the users decisions for future sessions.
191
+ * This method can only be used, when the configuration (dynatrace.config.js) for android or iOS is using the userOptIn mode.
192
+ * When the user changes the {@link DataCollectionLevel} a new session will be started.
193
+ *
194
+ * @deprecated Please use {@link applyUserPrivacyOptions} to apply the current data collection level value.
195
+ *
196
+ * @param {DataCollectionLevel} dataCollectionLevel New data collection level
197
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
159
198
  */
160
199
  setDataCollectionLevel(dataCollectionLevel: DataCollectionLevel, platform?: Platform): void;
161
200
 
162
201
  /**
163
- * Get the current user privacy options including data collection
164
- * level (Off, Performance, UserBehavior) and if crash reporting
165
- * is enabled
166
- * @param {Platform} platform - if empty default is both platforms
202
+ * Get the current user privacy options including data collection level (Off, Performance, UserBehavior)
203
+ * and if crash reporting opt-in is enabled
204
+ *
205
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
206
+ * @returns {Promise<UserPrivacyOptions>} current user privacy options
167
207
  */
168
208
  getUserPrivacyOptions(platform?: Platform): Promise<UserPrivacyOptions>;
169
209
 
170
210
  /**
171
- * Set the data collection level (Off, Performance, UserBehavior)
172
- * @param {DataCollectionLevel} dataCollectionLevel - Off, Performance, UserBehavior
173
- * @param {boolean} crashReportingOptedIn - is crash reporting enabled
174
- * @param {Platform} platform - if empty default is both platforms
211
+ * Creates a new session with the specified privacy settings and stores the privacy settings for future sessions.
212
+ * This method can only be used, when user opt-in feature is enabled. This method call has no effect,
213
+ * if the given privacy settings are identical to the previously specified privacy settings.
214
+ *
215
+ * @param {UserPrivacyOptions} userPrivacyOptions the new privacy settings from the user
216
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
175
217
  */
176
218
  applyUserPrivacyOptions(userPrivacyOptions: UserPrivacyOptions, platform?: Platform): void;
177
219
 
178
220
  /**
179
- * Report an error without an action
180
- * @param {string} errorName - Name of the error event
181
- * @param {number} errorCode - The code of the error
182
- * @param {Platform} platform - if empty default is both platforms
221
+ * Similar to {@link IDynatraceAction.reportError}. But the error event is reported as root action.
222
+ *
223
+ * @param {string} errorName Name of the error event
224
+ * @param {number} errorCode The code of the error
225
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
183
226
  */
184
227
  reportError(errorName: string, errorCode: number, platform?: Platform): void;
185
228
 
186
229
  /**
187
- * @deprecated Please use same named function with errorValue parameter
188
230
  * Reports a stacktrace
189
- * @param {String} errorName Name of the Error - SyntaxError
190
- * @param {String} reason Reason for the Error
191
- * @param {String} stacktrace Whole Stacktrace
192
- * @param {Number} platform Platform wise or both
231
+ *
232
+ * @deprecated Please use {@link reportErrorStacktrace} instead.
233
+ *
234
+ * @param {string} errorName Name of the Error - SyntaxError
235
+ * @param {string} reason Reason for the Error
236
+ * @param {string} stacktrace Whole Stacktrace
237
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
193
238
  */
194
239
  reportErrorWithStacktrace(errorName: string, reason: string, stacktrace: string, platform?: Platform): void;
195
240
 
196
241
  /**
197
242
  * Reports a stacktrace
198
- * @param {String} errorName Name of the Error - SyntaxError
199
- * @param {String} errorValue Value of the Error
200
- * @param {String} reason Reason for the Error
201
- * @param {String} stacktrace Whole Stacktrace
202
- * @param {Number} platform Platform wise or both
243
+ *
244
+ * @param {string} errorName Name of the error
245
+ * @param {string} errorValue Value of the error
246
+ * @param {string} reason Reason for the error
247
+ * @param {string} stacktrace Whole stacktrace
248
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
203
249
  */
204
250
  reportErrorStacktrace(errorName: string, errorValue: string, reason: string, stacktrace: string, platform?: Platform): void;
205
251
 
206
252
  /**
207
- * Reports a crash
208
- * @param {String} crashName Name of the Crash
209
- * @param {String} reason Reason for the Crash
210
- * @param {String} stacktrace Whole Stacktrace
211
- * @param {Number} platform Platform wise or both
253
+ * Reports a custom crash
254
+ *
255
+ * @param {string} crashName Name of the crash
256
+ * @param {string} reason Reason for the crash
257
+ * @param {string} stacktrace Whole stacktrace
258
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
212
259
  */
213
260
  reportCrash(crashName: string, reason: string, stacktrace: string, platform?: Platform): void;
214
261
 
215
262
  /**
216
263
  * Reports a crash with an error object (which needs to contain a stacktrace)
217
- * @param crashName Name of the crash
218
- * @param crash error object
264
+ *
265
+ * @param {string} crashName Name of the crash
266
+ * @param {Error} crash error object
219
267
  */
220
268
  reportCrashWithException(crashName: string, crash: Error);
221
269
 
222
270
  /**
223
- * Puts a set of http headers on every agent http request (f.e. the {@code Authorization} header). It also triggers the agent to
224
- * reconnect to the beacon endpoint with the new headers. To clear the previous headers, call the method without any parameters.
225
- * @param headers a set of http headers
226
- */
271
+ * Puts a set of http headers on every agent http request (eg. the Authorization header). It also triggers the agent to
272
+ * reconnect to the beacon endpoint with the new headers. To clear the previous headers,
273
+ * call the method with a null or empty value.
274
+ *
275
+ * @param {Map<string, string>} headers a set of http headers
276
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
277
+ */
227
278
  setBeaconHeaders(headers?: Map<string, string> | null, platform?: Platform): void;
228
279
 
229
280
  /**
@@ -237,69 +288,150 @@ export declare const Dynatrace: {
237
288
  *
238
289
  * Note: Business events are only supported on Dynatrace SaaS deployments currently.
239
290
  *
240
- * @param type Mandatory event type
241
- * @param attributes Must be a valid JSON object and cannot contain functions,
291
+ * @param {string} type Mandatory event type
292
+ * @param {JSONObject} attributes Must be a valid JSON object and cannot contain functions,
242
293
  * undefined, Infinity and NaN as values, otherwise they will be removed.
243
294
  * Attributes need to be serializable using JSON.stringify.
244
295
  * The resulting event will be populated with attributes parameter,
245
296
  * and enriched with additional properties, thus also empty objects are valid.
246
- * @param platform Option to restrict this call for a certain platform
247
- * @returns void
297
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
248
298
  */
249
299
  sendBizEvent(type: string, attributes?: JSONObject, platform?: Platform): void;
250
300
  }
251
301
 
252
- export declare class DynatraceAction {
302
+ export declare interface IDynatraceAction {
253
303
  /**
254
304
  * Report an error
255
- * @param {string} errorName - Name of the error event
256
- * @param {number} errorCode - The code of the error
257
- * @param {Platform} platform - if empty default is both platforms
305
+ *
306
+ * @param {string} errorName Name of the error event
307
+ * @param {number} errorCode The code of the error
308
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
258
309
  */
259
310
  reportError(errorName: string, errorCode: number, platform?: Platform): void;
260
311
 
261
312
  /**
262
313
  * Report an event
263
- * @param {string} eventName - Name of the event
264
- * @param {Platform} platform - if empty default is both platforms
314
+ *
315
+ * @param {string} eventName Name of the event
316
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
265
317
  */
266
318
  reportEvent(eventName: string, platform?: Platform): void;
267
319
 
268
320
  /**
269
321
  * Report a string value
270
- * @param {string} valueName - Name of the value
271
- * @param {string} value - The string value
272
- * @param {Platform} platform - if empty default is both platforms
322
+ *
323
+ * @param {string} valueName Name of the value
324
+ * @param {string} value The string value
325
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
273
326
  */
274
327
  reportStringValue(valueName: string, value: string, platform?: Platform): void;
275
328
 
276
329
  /**
277
330
  * Report a int value
278
- * @param {string} valueName - Name of the value
279
- * @param {Number} value - The int value
280
- * @param {Platform} platform - if empty default is both platforms
331
+ *
332
+ * @param {string} valueName Name of the value
333
+ * @param {number} value The int value
334
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
281
335
  */
282
- reportIntValue(valueName: string, value: Number, platform?: Platform): void;
336
+ reportIntValue(valueName: string, value: number, platform?: Platform): void;
283
337
 
284
338
  /**
285
339
  * Report a double value
286
- * @param {string} valueName - Name of the value
287
- * @param {Number} value - The double value
288
- * @param {Platform} platform - if empty default is both platforms
340
+ *
341
+ * @param {string} valueName Name of the value
342
+ * @param {number} value The double value
343
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
289
344
  */
290
- reportDoubleValue(valueName: string, value: Number, platform?: Platform): void;
345
+ reportDoubleValue(valueName: string, value: number, platform?: Platform): void;
291
346
 
292
347
  /**
293
348
  * Leave action
294
- * @param {Platform} platform - if empty default is both platforms
349
+ *
350
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
295
351
  */
296
352
  leaveAction(platform?: Platform): void;
297
353
 
298
354
  /**
299
355
  * Cancel action
300
- * @param {Platform} platform - if empty default is both platforms
356
+ *
357
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
301
358
  */
302
359
  cancel(platform?: Platform): void;
360
+
361
+ /**
362
+ * Retrieve the request tag for this certain root action. This will
363
+ * allow you to manually link a web request to this action if you use
364
+ * this tag as header value.
365
+ *
366
+ * @param {string} url URL that you want to track
367
+ * @returns {Promise<string>} header tag which should be applied onto the request
368
+ */
369
+ getRequestTag(url: string): Promise<string>;
370
+
371
+ /**
372
+ * If you want to manually link a web request with an action this is
373
+ * the name of the header you need to set.
374
+ *
375
+ * @returns {string} name of the header that should be used for tagging a request
376
+ */
377
+ getRequestTagHeader(): string;
378
+ }
379
+
380
+ /**
381
+ * Root action which can additionally to the normal IDynatraceAction
382
+ * create another layer of actions underneath.
383
+ */
384
+ export declare interface IDynatraceRootAction extends IDynatraceAction {
385
+ /**
386
+ * Create a child action
387
+ *
388
+ * @param {string} actionName - name of action
389
+ * @param {Platform} platform Is optional, which means by default this call will be applied on both platforms (Android & iOS).
390
+ * @return {IDynatraceAction} created action
391
+ */
392
+ enterAction(name: string, platform?: Platform): IDynatraceAction;
393
+ }
394
+
395
+ /**
396
+ * The Web request timing interface which can be used to measure a web request manually
397
+ */
398
+ export declare interface IDynatraceWebRequestTiming {
399
+
400
+ /**
401
+ * Constructor for creating a DynatraceWebRequestTiming
402
+ * @param {string} requestTag Request Tag for the action to be linked to
403
+ * @param {string} url URL that should be linked
404
+ */
405
+ constructor(requestTag: string, url: string);
406
+
407
+ /**
408
+ * Start the measurment of the web request. Call this before the request is started.
409
+ */
410
+ startWebRequestTiming(): void;
411
+
412
+ /**
413
+ * Stops the measurment of the web request. This needs to be called after the request is executed.
414
+ * The responseCode and responseMessage will be transfered and shown in the web UI.
415
+ *
416
+ * @param {number} responseCode Status Code of the response e.g. 200
417
+ * @param {string} responseMessage Message of the response
418
+ */
419
+ stopWebRequestTiming(responseCode: number, responseMessage: string): void;
420
+
421
+ /**
422
+ * Returns the content for the header that is needed in order to track a request
423
+ *
424
+ * @returns {string} header tag which should be applied onto the request
425
+ */
426
+ getRequestTag(): string;
427
+
428
+ /**
429
+ * Returns the name for the header that is needed in order to track a request
430
+ *
431
+ * @returns {string} name of the header that should be used for tagging a request
432
+ */
433
+ getRequestTagHeader(): string;
434
+
303
435
  }
304
436
 
305
437
  /**
@@ -309,36 +441,36 @@ export declare class UserPrivacyOptions {
309
441
 
310
442
  /**
311
443
  * Constructor for creation of a privacy settings object
312
- * @param dataCollectionLevel Data collection level.
313
- * @param crashReportingOptedIn If crash reporting should be enabled.
444
+ * @param {DataCollectionLevel} dataCollectionLevel Data collection level.
445
+ * @param {boolean} crashReportingOptedIn If crash reporting should be enabled.
314
446
  */
315
447
  constructor(dataCollectionLevel: DataCollectionLevel, crashReportingOptedIn: boolean);
316
448
 
317
449
  /**
318
450
  * Returns the specified data collection level.
319
451
  *
320
- * @returns the specified data collection level
452
+ * @returns {DataCollectionLevel} the specified data collection level
321
453
  */
322
454
  get dataCollectionLevel(): DataCollectionLevel;
323
455
 
324
456
  /**
325
457
  * Sets the data collection level specified by the user.
326
458
  *
327
- * @param dataCollectionLevel the specified data collection level from the user
459
+ * @param {DataCollectionLevel} dataCollectionLevel the specified data collection level from the user
328
460
  */
329
461
  set dataCollectionLevel(dataCollectionLevel: DataCollectionLevel);
330
462
 
331
463
  /**
332
464
  * Returns the opt-in value for crash reporting.
333
465
  *
334
- * @return the opt-in value for crash reporting
466
+ * @return {boolean} the opt-in value for crash reporting
335
467
  */
336
468
  get crashReportingOptedIn(): boolean;
337
469
 
338
470
  /**
339
471
  * Sets the privacy setting for crash reporting.
340
472
  *
341
- * @param crashReportingOptedIn the opt-in value specified by the user
473
+ * @param {boolean} crashReportingOptedIn the opt-in value specified by the user
342
474
  */
343
475
  set crashReportingOptedIn(crashReportingOptedIn: boolean);
344
476
  }
@@ -349,15 +481,15 @@ export declare class UserPrivacyOptions {
349
481
  export declare class ManualStartupConfiguration {
350
482
  /**
351
483
  * Creates a Manual Startup configuration instance
352
- * @param beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
353
- * @param applicationId Identifies your mobile app. This property is mandatory for manual startup
354
- * @param reportCrash Allows reporting React Native crashes.
355
- * @param 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.
356
- * @param 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.
357
- * @param certificateValidation Allows the use of self-signed certificates.
358
- * @param userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
484
+ *
485
+ * @param {string} beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
486
+ * @param {string} applicationId Identifies your mobile app. This property is mandatory for manual startup
487
+ * @param {boolean} reportCrash Allows reporting React Native crashes.
488
+ * @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.
489
+ * @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.
490
+ * @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
491
+ * @param {string} bundleName Will define the bundle name which will prefix internal action ids.
359
492
  */
360
493
  constructor(beaconUrl: string, applicationId: string, reportCrash?: boolean,
361
- logLevel?: LogLevel, lifecycleUpdate?: boolean, certificateValidation?: boolean,
362
- userOptIn?: boolean);
494
+ logLevel?: LogLevel, lifecycleUpdate?: boolean, userOptIn?: boolean, bundleName?: string);
363
495
  }