@dynatrace/react-native-plugin 2.303.1 → 2.303.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -8
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.java +0 -6
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -5
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -5
- package/ios/DynatraceRNBridge.h +0 -1
- package/ios/DynatraceRNBridge.mm +0 -8
- package/lib/instrumentor/base/Dynatrace.js +0 -20
- package/package.json +1 -1
- package/src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts +0 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ If you want to start using this plugin and are not a Dynatrace customer yet, hea
|
|
|
23
23
|
* React Native v0.60 or newer
|
|
24
24
|
* For Android users:
|
|
25
25
|
* SDK version 21+
|
|
26
|
-
* Gradle version
|
|
26
|
+
* Gradle version 7.0+ ([How to update?](#updating-to-gradle-7))
|
|
27
27
|
* Android Gradle plugin version 7.0+
|
|
28
28
|
* Java 11
|
|
29
29
|
* For iOS users: Minimum iOS 12
|
|
@@ -78,7 +78,7 @@ This agent versions are configured in this plugin:
|
|
|
78
78
|
* [How does Dynatrace automatically report crashes?](#how-does-dynatrace-automatically-report-crashes)
|
|
79
79
|
* [React Automatic Runtime](#react-automatic-runtime)
|
|
80
80
|
* [Using a second transformer besides the dynatrace transformer](#using-a-second-transformer-besides-the-dynatrace-transformer)
|
|
81
|
-
* [Upgrading project to Gradle
|
|
81
|
+
* [Upgrading project to Gradle 7](#updating-to-gradle-7)
|
|
82
82
|
* [Maven Central in top-level gradle file](#maven-central-in-top-level-gradle-file)
|
|
83
83
|
* [Configuration of standalone React Native project](#configuration-of-standalone-react-native-project)
|
|
84
84
|
* [Instrumentation Overhead](#instrumentation-overhead)
|
|
@@ -1314,17 +1314,17 @@ The location of the [top-level build.gradle](https://dt-url.net/jm610pso) should
|
|
|
1314
1314
|
**Note:**
|
|
1315
1315
|
JCenter has noted its [sunset](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/) on May 1st. Though, JCenter is still syncing with Maven Central so having`jcenter()` in your **build.gradle** file without the use of `mavenCentral()` will retrieve the Dynatrace Android Gradle Plugin no problem.
|
|
1316
1316
|
|
|
1317
|
-
## Updating to Gradle
|
|
1317
|
+
## Updating to Gradle 7
|
|
1318
1318
|
|
|
1319
|
-
Updating Gradle only affects your Android build. To update your project to Gradle
|
|
1319
|
+
Updating Gradle only affects your Android build. To update your project to Gradle 7, modify the following 3 files in your Android folder.
|
|
1320
1320
|
|
|
1321
1321
|
- `ProjectFolder\android\gradle\wrapper\gradle-wrapper.properties` Update the distributionUrl to get a newer gradle version.
|
|
1322
1322
|
|
|
1323
1323
|
```
|
|
1324
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.
|
|
1324
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip
|
|
1325
1325
|
```
|
|
1326
1326
|
|
|
1327
|
-
- `ProjectFolder\android\build.gradle` Update the version of your Android gradle plugin (minimum
|
|
1327
|
+
- `ProjectFolder\android\build.gradle` Update the version of your Android gradle plugin (minimum 7.x) as Gradle 7 needs a newer one. To get the newer versions, add `google()` in your repositories. Example of a build.gradle file:
|
|
1328
1328
|
|
|
1329
1329
|
```
|
|
1330
1330
|
buildscript {
|
|
@@ -1332,7 +1332,7 @@ buildscript {
|
|
|
1332
1332
|
google()
|
|
1333
1333
|
}
|
|
1334
1334
|
dependencies {
|
|
1335
|
-
classpath 'com.android.tools.build:gradle:
|
|
1335
|
+
classpath 'com.android.tools.build:gradle:x.x.x'
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
1338
|
|
|
@@ -1460,9 +1460,10 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
|
|
|
1460
1460
|
<br/><br/>
|
|
1461
1461
|
## Changelog
|
|
1462
1462
|
|
|
1463
|
-
2.303.
|
|
1463
|
+
2.303.2
|
|
1464
1464
|
* Updated Android (8.303.2.1014) & iOS Agent (8.303.1.1004)
|
|
1465
1465
|
* Android Gradle Plugin version requirement raised to 7.0+
|
|
1466
|
+
* Gradle Plugin version requirement raised to 7.0+
|
|
1466
1467
|
* Fixed warnings for jsx runtime when using expo
|
|
1467
1468
|
|
|
1468
1469
|
2.301.2
|
|
@@ -262,12 +262,6 @@ public class DynatraceRNBridgeImpl {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
public void sendEvent(String name, ReadableMap attributes, String platform) {
|
|
266
|
-
if(this.shouldWorkOnAndroid(platform)) {
|
|
267
|
-
Dynatrace.sendEvent(name, new JSONObject(toHashMap(attributes)));
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
265
|
public void sendBizEvent(String type, ReadableMap attributes, String platform) {
|
|
272
266
|
if(this.shouldWorkOnAndroid(platform)) {
|
|
273
267
|
Dynatrace.sendBizEvent(type, new JSONObject(toHashMap(attributes)));
|
|
@@ -135,11 +135,6 @@ public class DynatraceRNBridge extends NativeDynatraceBridgeSpec {
|
|
|
135
135
|
this.impl.reportDoubleValueInAction(actionKey, name, value, platform);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
@Override
|
|
139
|
-
public void sendEvent(String name, ReadableMap attributes, String platform) {
|
|
140
|
-
this.impl.sendEvent(name, attributes, platform);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
138
|
@Override
|
|
144
139
|
public void sendBizEvent(String type, ReadableMap attributes, String platform) {
|
|
145
140
|
this.impl.sendBizEvent(type, attributes, platform);
|
|
@@ -137,11 +137,6 @@ public class DynatraceRNBridge extends ReactContextBaseJavaModule {
|
|
|
137
137
|
this.impl.reportDoubleValueInAction(actionKey, name, value, platform);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
@ReactMethod
|
|
141
|
-
public void sendEvent(String name, ReadableMap attributes, String platform) {
|
|
142
|
-
this.impl.sendEvent(name, attributes, platform);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
140
|
@ReactMethod
|
|
146
141
|
public void sendBizEvent(String type, ReadableMap attributes, String platform) {
|
|
147
142
|
this.impl.sendBizEvent(type, attributes, platform);
|
package/ios/DynatraceRNBridge.h
CHANGED
|
@@ -28,7 +28,6 @@ typedef enum : NSUInteger {
|
|
|
28
28
|
@end
|
|
29
29
|
|
|
30
30
|
@interface Dynatrace (Events)
|
|
31
|
-
+ (void)sendEventWithName:(NSString*)name attributes:(NSDictionary<NSString*,id>* _Nullable)attributes;
|
|
32
31
|
+ (void)sendBizEventWithType:(NSString *)type attributes:(NSDictionary<NSString *, id> *_Nullable)attributes;
|
|
33
32
|
@end
|
|
34
33
|
|
package/ios/DynatraceRNBridge.mm
CHANGED
|
@@ -301,14 +301,6 @@ RCT_EXPORT_METHOD(reportEventInAction:(nonnull NSString *)actionKey withName: (N
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
RCT_EXPORT_METHOD(sendEvent:(NSString *)name withAttributes:(NSDictionary<NSString*, id>*) attributes platform: (NSString *) platform)
|
|
305
|
-
{
|
|
306
|
-
if ([self shouldWorkOnIosWithPlatform: platform])
|
|
307
|
-
{
|
|
308
|
-
[Dynatrace sendEventWithName:name attributes:attributes];
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
304
|
RCT_EXPORT_METHOD(sendBizEvent:(NSString *)type withAttributes:(NSDictionary<NSString*, id>*) attributes platform: (NSString *) platform)
|
|
313
305
|
{
|
|
314
306
|
if ([self shouldWorkOnIosWithPlatform: platform])
|
|
@@ -191,26 +191,6 @@ exports.Dynatrace = {
|
|
|
191
191
|
Logger_1.Logger.logInfo(`Dynatrace reportCrashWithException(${crashName}, ${crash}): React Native plugin has not been started yet! Crash will not be reported!`);
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
|
-
sendEvent: (name, attributes = {}, platform) => {
|
|
195
|
-
if (ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
196
|
-
if (StringUtils_1.StringUtils.isStringNullEmptyOrUndefined(name)) {
|
|
197
|
-
Logger_1.Logger.logDebug(`Dynatrace sendEvent(${name}, ${attributes}): Name must be a non empty string`);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
if (typeof attributes !== 'object' ||
|
|
201
|
-
attributes === null ||
|
|
202
|
-
Array.isArray(attributes)) {
|
|
203
|
-
Logger_1.Logger.logDebug(`Dynatrace sendEvent(${name}, ${attributes}): Payload toplevel must be an object`);
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
const internalAttributes = Object.assign({}, attributes);
|
|
207
|
-
Logger_1.Logger.logDebug(`Dynatrace sendEvent(${name}, ${internalAttributes})`);
|
|
208
|
-
DynatraceBridge_1.DynatraceNative.sendEvent(name, internalAttributes, platform === null || platform === void 0 ? void 0 : platform.toString());
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
Logger_1.Logger.logInfo(`Dynatrace sendEvent(${name}, ${attributes}): React Native plugin has not been started yet! Event will not be reported!`);
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
194
|
sendBizEvent: (type, attributes = {}, platform) => {
|
|
215
195
|
if (ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
216
196
|
if (StringUtils_1.StringUtils.isStringNullEmptyOrUndefined(type)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/react-native-plugin",
|
|
3
|
-
"version": "2.303.
|
|
3
|
+
"version": "2.303.2",
|
|
4
4
|
"description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "typings/react-native-dynatrace.d.ts",
|