@dynatrace/react-native-plugin 2.283.3 → 2.285.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 +26 -2
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.java +39 -17
- package/files/plugin.gradle +1 -1
- package/lib/dynatrace-transformer.js +6 -1
- package/lib/instrumentor/base/DynatraceAction.js +1 -1
- package/package.json +3 -3
- package/react-native-dynatrace.podspec +1 -1
package/README.md
CHANGED
|
@@ -29,8 +29,8 @@ If you want to start using this plugin and are not a Dynatrace customer yet, hea
|
|
|
29
29
|
## Agent Versions
|
|
30
30
|
This agent versions are configured in this plugin:
|
|
31
31
|
|
|
32
|
-
* Android Agent: 8.
|
|
33
|
-
* iOS Agent: 8.
|
|
32
|
+
* Android Agent: 8.287.1.1006
|
|
33
|
+
* iOS Agent: 8.285.1.1004
|
|
34
34
|
|
|
35
35
|
## Quick Setup
|
|
36
36
|
|
|
@@ -1053,6 +1053,25 @@ module.exports = {
|
|
|
1053
1053
|
};
|
|
1054
1054
|
```
|
|
1055
1055
|
|
|
1056
|
+
Using `@react-native/babel-preset`:
|
|
1057
|
+
|
|
1058
|
+
```js
|
|
1059
|
+
module.exports = {
|
|
1060
|
+
presets: [
|
|
1061
|
+
['module:@react-native/babel-preset'],
|
|
1062
|
+
],
|
|
1063
|
+
plugins: [
|
|
1064
|
+
[
|
|
1065
|
+
'@babel/plugin-transform-react-jsx',
|
|
1066
|
+
{
|
|
1067
|
+
runtime: 'automatic',
|
|
1068
|
+
importSource: "@dynatrace/react-native-plugin"
|
|
1069
|
+
},
|
|
1070
|
+
],
|
|
1071
|
+
],
|
|
1072
|
+
};
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1056
1075
|
Using `metro-react-native-babel-preset`:
|
|
1057
1076
|
|
|
1058
1077
|
```js
|
|
@@ -1277,6 +1296,11 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
|
|
|
1277
1296
|
<br/><br/>
|
|
1278
1297
|
## Changelog
|
|
1279
1298
|
|
|
1299
|
+
2.285.2
|
|
1300
|
+
* Fixed bridge module issue for older React Native versions (< 0.65.0)
|
|
1301
|
+
* Introduced support for @react-native/metro-babel-transformer
|
|
1302
|
+
* Update Android (8.287.1.1006) & iOS Agent (8.285.1.1004)
|
|
1303
|
+
|
|
1280
1304
|
2.283.3
|
|
1281
1305
|
* Added Auto-Instrumentation for React Native Switch
|
|
1282
1306
|
* Updated instrumentation of RefreshControl (dtActionIgnore & dtActionName)
|
package/android/build.gradle
CHANGED
|
@@ -70,7 +70,7 @@ repositories {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
dependencies {
|
|
73
|
-
implementation 'com.dynatrace.agent:agent-android:8.
|
|
73
|
+
implementation 'com.dynatrace.agent:agent-android:8.287.1.1006'
|
|
74
74
|
implementation "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -1,34 +1,57 @@
|
|
|
1
1
|
package com.dynatrace.android.agent;
|
|
2
2
|
|
|
3
3
|
import androidx.annotation.Nullable;
|
|
4
|
+
import android.util.Log;
|
|
5
|
+
|
|
6
|
+
import com.facebook.react.ReactPackage;
|
|
4
7
|
import com.facebook.react.TurboReactPackage;
|
|
5
8
|
import com.facebook.react.bridge.NativeModule;
|
|
6
9
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
10
|
import com.facebook.react.module.model.ReactModuleInfo;
|
|
8
11
|
import com.facebook.react.module.model.ReactModuleInfoProvider;
|
|
12
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
9
13
|
|
|
10
14
|
import java.util.HashMap;
|
|
11
15
|
import java.util.Map;
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
import java.util.Arrays;
|
|
18
|
+
import java.util.Collections;
|
|
19
|
+
import java.util.List;
|
|
20
|
+
|
|
21
|
+
public class DynatraceReactPackage extends TurboReactPackage implements ReactPackage {
|
|
22
|
+
|
|
23
|
+
@Override
|
|
24
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
25
|
+
return Collections.emptyList();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Override
|
|
29
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
30
|
+
PrivateDTBridge bridge = new PrivateDTBridge(reactContext);
|
|
31
|
+
return Arrays.<NativeModule>asList(new DynatraceRNBridge(reactContext, bridge), bridge);
|
|
32
|
+
}
|
|
14
33
|
|
|
15
34
|
@Override
|
|
16
35
|
public ReactModuleInfoProvider getReactModuleInfoProvider() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
|
|
37
|
+
boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
38
|
+
moduleInfos.put(
|
|
39
|
+
DynatraceRNBridgeImpl.NAME,
|
|
40
|
+
new ReactModuleInfo(
|
|
41
|
+
DynatraceRNBridgeImpl.NAME,
|
|
42
|
+
DynatraceRNBridgeImpl.NAME,
|
|
43
|
+
false, // canOverrideExistingModule
|
|
44
|
+
false, // needsEagerInit
|
|
45
|
+
true, // hasConstants
|
|
46
|
+
false, // isCxxModule
|
|
47
|
+
isTurboModule // isTurboModule
|
|
48
|
+
));
|
|
49
|
+
|
|
50
|
+
return new ReactModuleInfoProvider() {
|
|
51
|
+
@Override
|
|
52
|
+
public Map<String, ReactModuleInfo> getReactModuleInfos() {
|
|
53
|
+
return moduleInfos;
|
|
54
|
+
}
|
|
32
55
|
};
|
|
33
56
|
}
|
|
34
57
|
|
|
@@ -41,5 +64,4 @@ public class DynatraceReactPackage extends TurboReactPackage {
|
|
|
41
64
|
return null;
|
|
42
65
|
}
|
|
43
66
|
}
|
|
44
|
-
|
|
45
67
|
}
|
package/files/plugin.gradle
CHANGED
|
@@ -46,7 +46,12 @@ const getUpstreamTransformer = (reactOptions) => {
|
|
|
46
46
|
return require(reactOptions.upstreamTransformer);
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
|
-
|
|
49
|
+
try {
|
|
50
|
+
return require('metro-react-native-babel-transformer/src/index');
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
return require('@react-native/metro-babel-transformer');
|
|
54
|
+
}
|
|
50
55
|
}
|
|
51
56
|
};
|
|
52
57
|
exports.getUpstreamTransformer = getUpstreamTransformer;
|
|
@@ -101,7 +101,7 @@ class DynatraceAction {
|
|
|
101
101
|
resolve('');
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
Logger_1.Logger.logDebug(`DynatraceAction
|
|
104
|
+
Logger_1.Logger.logDebug(`DynatraceAction getRequestTag(${url}): in Action - ${this.name}`);
|
|
105
105
|
return DynatraceBridge_1.DynatraceNative.getRequestTag(this.key, url);
|
|
106
106
|
}
|
|
107
107
|
getRequestTagHeader() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/react-native-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.285.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",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"author": "Dynatrace",
|
|
72
72
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@babel/runtime": "^7.
|
|
75
|
-
"jscodeshift": "^0.15.
|
|
74
|
+
"@babel/runtime": "^7.24.0",
|
|
75
|
+
"jscodeshift": "^0.15.2",
|
|
76
76
|
"plist": "^3.1.0",
|
|
77
77
|
"proxy-polyfill": "^0.3.2",
|
|
78
78
|
"semver": "^7.6.0"
|
|
@@ -111,7 +111,7 @@ Pod::Spec.new do |s|
|
|
|
111
111
|
#
|
|
112
112
|
|
|
113
113
|
s.dependency "React"
|
|
114
|
-
s.dependency 'Dynatrace', '~> 8.
|
|
114
|
+
s.dependency 'Dynatrace', '~> 8.285.1.1004'
|
|
115
115
|
|
|
116
116
|
# Allows for better compatibility for older and newer versions
|
|
117
117
|
if defined?(install_modules_dependencies)
|