@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.
- package/LICENSE.md +1 -0
- package/README.md +41 -16
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridge.java +74 -21
- package/files/plugin.gradle +1 -1
- package/ios/DynatraceRNBridge.h +2 -2
- package/ios/DynatraceRNBridge.m +38 -17
- package/ios/lib/Dynatrace.xcframework/Info.plist +10 -10
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +46 -1
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +3 -3
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Info.plist +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.swiftinterface +4 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Modules/module.modulemap +2 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace-Swift.h +82 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +3 -3
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +4 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +2 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +61 -65
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace-Swift.h +46 -1
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +3 -3
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Info.plist +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.swiftinterface +3 -1
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Modules/module.modulemap +2 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace-Swift.h +82 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +3 -3
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Info.plist +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/arm64-apple-tvos-simulator.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/Project/x86_64-apple-tvos-simulator.swiftsourceinfo +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.swiftinterface +3 -1
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.abi.json +21 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.private.swiftinterface +9 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftdoc +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.swiftinterface +3 -1
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/module.modulemap +2 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +67 -23
- package/lib/instrumentor/DynatraceInstrumentation.js +1 -1
- package/lib/instrumentor/base/Dynatrace.js +48 -31
- package/lib/instrumentor/base/DynatraceAction.js +44 -0
- package/lib/instrumentor/base/DynatraceInternal.js +25 -0
- package/lib/instrumentor/base/DynatraceRootAction.js +38 -0
- package/lib/instrumentor/base/DynatraceWebRequestTiming.js +37 -0
- package/lib/instrumentor/base/ElementHelper.js +3 -2
- package/lib/instrumentor/base/ErrorHandler.js +2 -1
- package/lib/instrumentor/base/NullAction.js +8 -0
- package/lib/instrumentor/base/NullRootAction.js +10 -0
- package/lib/instrumentor/base/NullWebRequestTiming.js +15 -0
- package/lib/instrumentor/base/Picker.js +1 -1
- package/lib/instrumentor/base/RefreshControl.js +1 -1
- package/lib/instrumentor/base/Touchable.js +11 -7
- package/lib/instrumentor/base/configuration/AutoStartupConfiguration.js +4 -0
- package/lib/instrumentor/base/configuration/Configuration.js +1 -0
- package/lib/instrumentor/base/configuration/ConfigurationDefaults.js +4 -2
- package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +5 -5
- package/lib/instrumentor/base/{interface → configuration/interface}/IAutoConfiguration.js +0 -0
- package/lib/instrumentor/base/configuration/interface/IManualConfiguration.js +3 -0
- package/lib/instrumentor/base/interface/IDynatraceInternal.js +2 -0
- package/lib/instrumentor/base/interface/IDynatraceRootAction.js +2 -0
- package/lib/instrumentor/base/interface/IWebRequestTiming.js +1 -0
- package/lib/instrumentor/base/util/StringUtils.js +1 -0
- package/lib/react/Component.js +3 -3
- package/package.json +5 -3
- package/react-native-dynatrace.podspec +3 -2
- 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
|
|
82
|
-
*
|
|
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
|
-
*
|
|
88
|
-
* will
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
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
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
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):
|
|
117
|
+
enterAction(name: string, platform?: Platform): IDynatraceAction;
|
|
102
118
|
|
|
103
119
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
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
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
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
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* @param {Number}
|
|
120
|
-
* @param {
|
|
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
|
-
*
|
|
126
|
-
*
|
|
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
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
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
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @
|
|
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
|
-
*
|
|
148
|
-
* @
|
|
149
|
-
*
|
|
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
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @
|
|
158
|
-
*
|
|
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
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* @param {Platform} platform
|
|
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
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
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
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* @param {
|
|
182
|
-
* @param {
|
|
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
|
-
*
|
|
190
|
-
* @
|
|
191
|
-
*
|
|
192
|
-
* @param {
|
|
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
|
-
*
|
|
199
|
-
* @param {
|
|
200
|
-
* @param {
|
|
201
|
-
* @param {
|
|
202
|
-
* @param {
|
|
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
|
-
*
|
|
209
|
-
* @param {
|
|
210
|
-
* @param {
|
|
211
|
-
* @param {
|
|
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
|
-
*
|
|
218
|
-
* @param
|
|
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
|
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
|
|
302
|
+
export declare interface IDynatraceAction {
|
|
253
303
|
/**
|
|
254
304
|
* Report an error
|
|
255
|
-
*
|
|
256
|
-
* @param {
|
|
257
|
-
* @param {
|
|
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
|
-
*
|
|
264
|
-
* @param {
|
|
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
|
-
*
|
|
271
|
-
* @param {string}
|
|
272
|
-
* @param {
|
|
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
|
-
*
|
|
279
|
-
* @param {
|
|
280
|
-
* @param {
|
|
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:
|
|
336
|
+
reportIntValue(valueName: string, value: number, platform?: Platform): void;
|
|
283
337
|
|
|
284
338
|
/**
|
|
285
339
|
* Report a double value
|
|
286
|
-
*
|
|
287
|
-
* @param {
|
|
288
|
-
* @param {
|
|
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:
|
|
345
|
+
reportDoubleValue(valueName: string, value: number, platform?: Platform): void;
|
|
291
346
|
|
|
292
347
|
/**
|
|
293
348
|
* Leave action
|
|
294
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
353
|
-
* @param
|
|
354
|
-
* @param
|
|
355
|
-
* @param
|
|
356
|
-
* @param
|
|
357
|
-
* @param
|
|
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,
|
|
362
|
-
userOptIn?: boolean);
|
|
494
|
+
logLevel?: LogLevel, lifecycleUpdate?: boolean, userOptIn?: boolean, bundleName?: string);
|
|
363
495
|
}
|