@dynatrace/react-native-plugin 2.273.1 → 2.277.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/README.md +155 -41
- package/android/build.gradle +1 -1
- package/files/plugin.gradle +1 -1
- package/index.js +2 -0
- package/ios/DynatraceRNBridge.m +1 -1
- package/ios/lib/Dynatrace.xcframework/Info.plist +5 -5
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- 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 +1 -1
- 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.h +1 -1
- 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 +1 -1
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.abi.json +1 -1
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +15 -15
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- 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_x86_64-simulator/Dynatrace.framework/Dynatrace +0 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Headers/Dynatrace.h +1 -1
- 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/_CodeSignature/CodeResources +11 -11
- package/lib/instrumentor/DynatraceInstrumentation.js +1 -1
- package/lib/instrumentor/base/Application.js +4 -3
- package/lib/instrumentor/base/Dynatrace.js +27 -27
- package/lib/instrumentor/base/DynatraceInternal.js +2 -3
- package/lib/instrumentor/base/DynatraceRootAction.js +3 -3
- package/lib/instrumentor/base/ErrorHandler.js +1 -1
- package/lib/instrumentor/base/Logger.js +2 -2
- package/lib/instrumentor/base/Touchable.js +3 -3
- package/lib/instrumentor/base/configuration/Configuration.js +13 -18
- package/lib/instrumentor/base/configuration/ConfigurationBuilder.js +56 -0
- package/lib/instrumentor/base/configuration/ConfigurationDefaults.js +2 -10
- package/lib/instrumentor/base/configuration/ConfigurationHandler.js +15 -0
- package/lib/instrumentor/base/configuration/ConfigurationPreset.js +23 -0
- package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +6 -4
- package/lib/react/Component.js +6 -6
- package/lib/react-navigation/ReactNavigation.js +22 -0
- package/package.json +1 -168
- package/scripts/Config.js +3 -0
- package/typings/react-native-dynatrace.d.ts +230 -3
- package/lib/instrumentor/base/configuration/AutoStartupConfiguration.js +0 -28
- package/lib/instrumentor/base/configuration/interface/IAutoConfiguration.js +0 -2
- /package/lib/instrumentor/base/configuration/{interface/IManualConfiguration.js → IConfiguration.js} +0 -0
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ManualStartupConfiguration = void 0;
|
|
4
4
|
const ConfigurationDefaults_1 = require("./ConfigurationDefaults");
|
|
5
|
+
const ConfigurationPreset_1 = require("./ConfigurationPreset");
|
|
5
6
|
class ManualStartupConfiguration {
|
|
6
7
|
constructor(beaconUrl, applicationId, reportCrash, logLevel, lifecycleUpdate, userOptIn, actionNamePrivacy, bundleName) {
|
|
7
8
|
this.reportCrash = ConfigurationDefaults_1.DEFAULT_REPORT_CRASH;
|
|
8
9
|
this.userOptIn = ConfigurationDefaults_1.DEFAULT_USER_OPT_IN;
|
|
9
|
-
this.logLevel = ConfigurationDefaults_1.DEFAULT_LOGLEVEL;
|
|
10
|
-
this.lifecycleUpdate = ConfigurationDefaults_1.DEFAULT_LIFECYCLE_UPDATE;
|
|
11
|
-
this.actionNamePrivacy = ConfigurationDefaults_1.DEFAULT_ACTION_NAME_PRIVACY;
|
|
12
|
-
this.bundleName = ConfigurationDefaults_1.DEFAULT_BUNDLE_NAME;
|
|
13
10
|
if (!applicationId || !beaconUrl) {
|
|
14
11
|
throw new Error('Dynatrace Startup Configuration is not correct! Missing applicationId and beaconUrl!');
|
|
15
12
|
}
|
|
16
13
|
this.applicationId = applicationId;
|
|
17
14
|
this.beaconUrl = beaconUrl;
|
|
15
|
+
const preset = new ConfigurationPreset_1.ConfigurationPreset();
|
|
16
|
+
this.logLevel = preset.getLogLevel();
|
|
17
|
+
this.lifecycleUpdate = preset.getLifecycleUpdate();
|
|
18
|
+
this.actionNamePrivacy = preset.getActionNamePrivacy();
|
|
19
|
+
this.bundleName = preset.getBundleName();
|
|
18
20
|
if (reportCrash != null) {
|
|
19
21
|
this.reportCrash = reportCrash;
|
|
20
22
|
}
|
package/lib/react/Component.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DynatraceClassWrapper = exports.DynatraceFnWrapper = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const ConfigurationHandler_1 = require("../instrumentor/base/configuration/ConfigurationHandler");
|
|
6
6
|
const Logger_1 = require("../instrumentor/base/Logger");
|
|
7
7
|
const NullAction_1 = require("../instrumentor/base/NullAction");
|
|
8
8
|
const Dynatrace_1 = require("../instrumentor/base/Dynatrace");
|
|
@@ -12,24 +12,24 @@ const DynatraceFnWrapper = (props) => {
|
|
|
12
12
|
if (action instanceof NullAction_1.NullAction) {
|
|
13
13
|
Logger_1.Logger.logInfo(`Component ${componentName}: React Native plugin has not been started yet! Component will not be reported!`);
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
16
|
action.leaveAction();
|
|
17
17
|
});
|
|
18
18
|
return props.children;
|
|
19
19
|
};
|
|
20
20
|
exports.DynatraceFnWrapper = DynatraceFnWrapper;
|
|
21
|
-
class DynatraceClassWrapper extends
|
|
21
|
+
class DynatraceClassWrapper extends react_1.Component {
|
|
22
22
|
constructor(props) {
|
|
23
23
|
super(props);
|
|
24
24
|
this.wrappingName = getNameFromComponent(props);
|
|
25
25
|
this.componentMounted = false;
|
|
26
26
|
}
|
|
27
27
|
render() {
|
|
28
|
-
if (!
|
|
28
|
+
if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
29
29
|
Logger_1.Logger.logInfo(`Component ${this.wrappingName}: React Native plugin has not been started yet! Component will not be reported!`);
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
if ((this.componentMounted &&
|
|
32
|
+
if ((this.componentMounted && ConfigurationHandler_1.ConfigurationHandler.isLifecycleUpdateEnabled()) ||
|
|
33
33
|
!this.componentMounted) {
|
|
34
34
|
const actionPrefix = !this.componentMounted ? 'Render ' : 'Update ';
|
|
35
35
|
this.internalAction = Dynatrace_1.Dynatrace.enterAutoAction(actionPrefix + this.wrappingName);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerListener = void 0;
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const Logger_1 = require("../instrumentor/base/Logger");
|
|
6
|
+
let isRegistered = false;
|
|
7
|
+
const registerListener = (navContainer) => {
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
if (isRegistered && navContainer.current != null && navContainer.current.addListener != null) {
|
|
10
|
+
isRegistered = true;
|
|
11
|
+
navContainer.current.addListener('__unsafe_action__', (data) => {
|
|
12
|
+
if (data != null && data.data != null && data.data.action != null) {
|
|
13
|
+
Logger_1.Logger.logDebug(`ReactNavigation Listener Dispatch: ${JSON.stringify(data.data.action)}`);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
navContainer.current.addListener('state', (state) => {
|
|
17
|
+
Logger_1.Logger.logDebug(`ReactNavigation Listener State: ${JSON.stringify(state)}`);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.registerListener = registerListener;
|
package/package.json
CHANGED
|
@@ -1,168 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dynatrace/react-native-plugin",
|
|
3
|
-
"version": "2.273.1",
|
|
4
|
-
"description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "typings/react-native-dynatrace.d.ts",
|
|
7
|
-
"bin": {
|
|
8
|
-
"instrumentDynatrace": "scripts/Instrument.js",
|
|
9
|
-
"configDynatrace": "scripts/CheckConfig.js"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [
|
|
12
|
-
"react-native",
|
|
13
|
-
"dynatrace",
|
|
14
|
-
"mobile",
|
|
15
|
-
"android",
|
|
16
|
-
"ios",
|
|
17
|
-
"performance",
|
|
18
|
-
"monitoring"
|
|
19
|
-
],
|
|
20
|
-
"rnpm": {
|
|
21
|
-
"plugin": "./command/command.js"
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"uninstall": "node ./scripts/Uninstall.js",
|
|
25
|
-
"test": "jest --runInBand",
|
|
26
|
-
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand",
|
|
27
|
-
"tsc": "tsc",
|
|
28
|
-
"tsc:prod": "tsc -p tsconfig.release.json",
|
|
29
|
-
"lint": "eslint --cache src/**/*.ts --ignore-pattern .gitignore",
|
|
30
|
-
"lint:spec": "eslint --cache tests/**/*.ts --cache-file tests/.eslintcache --ignore-pattern .gitignore --fix"
|
|
31
|
-
},
|
|
32
|
-
"jest": {
|
|
33
|
-
"preset": "react-native",
|
|
34
|
-
"moduleDirectories": [
|
|
35
|
-
"node_modules"
|
|
36
|
-
],
|
|
37
|
-
"unmockedModulePathPatterns": [
|
|
38
|
-
"node_modules"
|
|
39
|
-
],
|
|
40
|
-
"modulePathIgnorePatterns": [
|
|
41
|
-
"<rootDir>/src",
|
|
42
|
-
"<rootDir>/tests/commandTestTmp",
|
|
43
|
-
"node_modules/react-native/local-cli"
|
|
44
|
-
],
|
|
45
|
-
"transform": {
|
|
46
|
-
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
47
|
-
},
|
|
48
|
-
"testPathIgnorePatterns": [
|
|
49
|
-
"<rootDir>/src",
|
|
50
|
-
"<rootDir>/tests/commandTestTmp"
|
|
51
|
-
],
|
|
52
|
-
"transformIgnorePatterns": [
|
|
53
|
-
"node_modules/(?!(@react-native|react-native)/)"
|
|
54
|
-
],
|
|
55
|
-
"setupFiles": [
|
|
56
|
-
"<rootDir>/tests/setup/setup.js"
|
|
57
|
-
],
|
|
58
|
-
"testResultsProcessor": "jest-junit",
|
|
59
|
-
"testRegex": [
|
|
60
|
-
"(/__tests__/.*|(\\.|/)(Test|spec))\\.[jt]sx?$"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"jest-junit": {
|
|
64
|
-
"suiteName": "jest tests",
|
|
65
|
-
"outputDirectory": ".",
|
|
66
|
-
"outputName": "junit.xml",
|
|
67
|
-
"uniqueOutputName": "true",
|
|
68
|
-
"ancestorSeparator": " › ",
|
|
69
|
-
"usePathForSuiteName": "true"
|
|
70
|
-
},
|
|
71
|
-
"author": "Dynatrace",
|
|
72
|
-
"license": "SEE LICENSE IN LICENSE.md",
|
|
73
|
-
"dependencies": {
|
|
74
|
-
"@babel/runtime": "^7.22.10",
|
|
75
|
-
"jscodeshift": "^0.15.0",
|
|
76
|
-
"plist": "^3.1.0",
|
|
77
|
-
"proxy-polyfill": "^0.3.2",
|
|
78
|
-
"semver": "^7.5.4"
|
|
79
|
-
},
|
|
80
|
-
"homepage": "https://www.dynatrace.com/",
|
|
81
|
-
"peerDependencies": {
|
|
82
|
-
"@babel/parser": ">=7.4.4",
|
|
83
|
-
"@react-native-picker/picker": ">=1.0.0",
|
|
84
|
-
"react": ">=16.8.0",
|
|
85
|
-
"react-native": ">=0.59.0"
|
|
86
|
-
},
|
|
87
|
-
"devDependencies": {
|
|
88
|
-
"@babel/cli": "^7.22.9",
|
|
89
|
-
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
|
90
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
|
|
91
|
-
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
|
|
92
|
-
"@babel/plugin-transform-flow-strip-types": "^7.8.3",
|
|
93
|
-
"@babel/plugin-transform-runtime": "^7.12.1",
|
|
94
|
-
"@babel/preset-env": "^7.4.4",
|
|
95
|
-
"@babel/preset-react": "^7.8.3",
|
|
96
|
-
"@testing-library/react-native": "^7.0.2",
|
|
97
|
-
"@types/jest": "^26.0.19",
|
|
98
|
-
"@types/jscodeshift": "^0.11.6",
|
|
99
|
-
"@types/libxmljs": "^0.18.3",
|
|
100
|
-
"@types/node": "^12.7.9",
|
|
101
|
-
"@types/plist": "^3.0.2",
|
|
102
|
-
"@types/react-native": "^0.63.32",
|
|
103
|
-
"@types/semver": "^7.5.0",
|
|
104
|
-
"@types/shelljs": "^0.8.8",
|
|
105
|
-
"@types/uglify-js": "^3.17.1",
|
|
106
|
-
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
|
107
|
-
"@typescript-eslint/parser": "^5.16.0",
|
|
108
|
-
"compressing": "^1.5.1",
|
|
109
|
-
"eslint": "^8.45.0",
|
|
110
|
-
"eslint-config-prettier": "^8.5.0",
|
|
111
|
-
"eslint-plugin-import": "^2.26.0",
|
|
112
|
-
"eslint-plugin-jsdoc": "^39.1.0",
|
|
113
|
-
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
114
|
-
"eslint-plugin-unicorn": "^42.0.0",
|
|
115
|
-
"jest": "24.9.0",
|
|
116
|
-
"jest-each": "^28.1.3",
|
|
117
|
-
"jest-junit": "^14.0.0",
|
|
118
|
-
"jest-mock": "^28.1.3",
|
|
119
|
-
"npm-check-updates": "^16.10.12",
|
|
120
|
-
"prettier": "^2.6.1",
|
|
121
|
-
"shelljs": "^0.8.5",
|
|
122
|
-
"ts-jest": "24.3.0",
|
|
123
|
-
"ts-mockito": "^2.6.1",
|
|
124
|
-
"typescript": "^4.7.4",
|
|
125
|
-
"uglify-js": "^3.17.4",
|
|
126
|
-
"react-native": "0.71.3",
|
|
127
|
-
"react": "18.2.0",
|
|
128
|
-
"react-test-renderer": "18.2.0"
|
|
129
|
-
},
|
|
130
|
-
"files": [
|
|
131
|
-
"command/command.js",
|
|
132
|
-
"command/util/*",
|
|
133
|
-
"command/interface/*",
|
|
134
|
-
"android/build.gradle",
|
|
135
|
-
"android/src/main/**/*",
|
|
136
|
-
"ios/**/*",
|
|
137
|
-
"files/*",
|
|
138
|
-
"lib/instrumentor/base/*.js",
|
|
139
|
-
"lib/instrumentor/base/model/*.js",
|
|
140
|
-
"lib/instrumentor/base/configuration/*.js",
|
|
141
|
-
"lib/instrumentor/base/configuration/interface/*.js",
|
|
142
|
-
"lib/instrumentor/base/interface/*.js",
|
|
143
|
-
"lib/instrumentor/base/util/*.js",
|
|
144
|
-
"lib/instrumentor/model/*.js",
|
|
145
|
-
"lib/instrumentor/parser/*.js",
|
|
146
|
-
"lib/instrumentor/DynatraceInstrumentation.js",
|
|
147
|
-
"lib/*.js",
|
|
148
|
-
"lib/community/*.js",
|
|
149
|
-
"lib/community/gesture-handler/*.js",
|
|
150
|
-
"lib/react-native/*.js",
|
|
151
|
-
"lib/react/*.js",
|
|
152
|
-
"lib/metro/*.js",
|
|
153
|
-
"lib/util/*.js",
|
|
154
|
-
"react-native.config.js",
|
|
155
|
-
"react-native-dynatrace.js",
|
|
156
|
-
"react-native-dynatrace.podspec",
|
|
157
|
-
"README.md",
|
|
158
|
-
"LICENSE.md",
|
|
159
|
-
"scripts/*",
|
|
160
|
-
"scripts/api/*",
|
|
161
|
-
"scripts/core/*",
|
|
162
|
-
"scripts/api/model/*",
|
|
163
|
-
"scripts/util/*",
|
|
164
|
-
"typings/*",
|
|
165
|
-
"package.json",
|
|
166
|
-
"jsx-runtime.js"
|
|
167
|
-
]
|
|
168
|
-
}
|
|
1
|
+
{"name":"@dynatrace/react-native-plugin","version":"2.277.1","description":"This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.","main":"index.js","types":"typings/react-native-dynatrace.d.ts","bin":{"instrumentDynatrace":"scripts/Instrument.js","configDynatrace":"scripts/CheckConfig.js"},"keywords":["react-native","dynatrace","mobile","android","ios","performance","monitoring"],"rnpm":{"plugin":"./command/command.js"},"scripts":{"uninstall":"node ./scripts/Uninstall.js","test":"jest --runInBand","test:debug":"node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand","tsc":"tsc","tsc:prod":"tsc -p tsconfig.release.json","lint":"eslint --cache src/**/*.ts --ignore-pattern .gitignore","lint:spec":"eslint --cache tests/**/*.ts --cache-file tests/.eslintcache --ignore-pattern .gitignore --fix"},"jest":{"preset":"react-native","moduleDirectories":["node_modules"],"unmockedModulePathPatterns":["node_modules"],"modulePathIgnorePatterns":["<rootDir>/src","<rootDir>/tests/commandTestTmp","node_modules/react-native/local-cli"],"transform":{"^.+\\.(ts|tsx)$":"ts-jest"},"testPathIgnorePatterns":["<rootDir>/src","<rootDir>/tests/commandTestTmp"],"transformIgnorePatterns":["node_modules/(?!(@react-native|react-native)/)"],"setupFiles":["<rootDir>/tests/setup/setup.js"],"testResultsProcessor":"jest-junit","testRegex":["(/__tests__/.*|(\\.|/)(Test|spec))\\.[jt]sx?$"]},"jest-junit":{"suiteName":"jest tests","outputDirectory":".","outputName":"junit.xml","uniqueOutputName":"true","ancestorSeparator":" › ","usePathForSuiteName":"true"},"author":"Dynatrace","license":"SEE LICENSE IN LICENSE.md","dependencies":{"@babel/runtime":"^7.23.2","jscodeshift":"^0.15.0","plist":"^3.1.0","proxy-polyfill":"^0.3.2","semver":"^7.5.4"},"homepage":"https://www.dynatrace.com/","peerDependencies":{"@babel/parser":">=7.4.4","@react-native-picker/picker":">=1.0.0","react":">=16.8.0","react-native":">=0.59.0"},"devDependencies":{"@babel/cli":"^7.22.9","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-proposal-nullish-coalescing-operator":"^7.8.3","@babel/plugin-proposal-optional-chaining":"^7.8.3","@babel/plugin-transform-flow-strip-types":"^7.8.3","@babel/plugin-transform-runtime":"^7.12.1","@babel/preset-env":"^7.4.4","@babel/preset-react":"^7.8.3","@testing-library/react-native":"^7.0.2","@types/jest":"^26.0.19","@types/jscodeshift":"^0.11.6","@types/libxmljs":"^0.18.3","@types/node":"^18.17.12","@types/plist":"^3.0.2","@types/react-native":"^0.63.32","@types/semver":"^7.5.0","@types/shelljs":"^0.8.8","@types/uglify-js":"^3.17.1","@typescript-eslint/eslint-plugin":"^5.16.0","@typescript-eslint/parser":"^5.16.0","compressing":"^1.5.1","eslint":"^8.45.0","eslint-config-prettier":"^8.5.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jsdoc":"^39.1.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-unicorn":"^42.0.0","jest":"24.9.0","jest-each":"^28.1.3","jest-junit":"^14.0.0","jest-mock":"^28.1.3","npm-check-updates":"^16.10.12","prettier":"^2.6.1","shelljs":"^0.8.5","ts-jest":"24.3.0","ts-mockito":"^2.6.1","typescript":"^4.7.4","uglify-js":"^3.17.4","react-native":"0.71.3","react":"18.2.0","react-test-renderer":"18.2.0"},"files":["command/command.js","command/util/*","command/interface/*","android/build.gradle","android/src/main/**/*","ios/**/*","files/*","lib/instrumentor/base/*.js","lib/instrumentor/base/model/*.js","lib/instrumentor/base/configuration/*.js","lib/instrumentor/base/configuration/interface/*.js","lib/instrumentor/base/interface/*.js","lib/instrumentor/base/util/*.js","lib/instrumentor/model/*.js","lib/instrumentor/parser/*.js","lib/instrumentor/DynatraceInstrumentation.js","lib/*.js","lib/community/*.js","lib/community/gesture-handler/*.js","lib/react-navigation/*.js","lib/react-native/*.js","lib/react/*.js","lib/metro/*.js","lib/util/*.js","react-native.config.js","react-native-dynatrace.js","react-native-dynatrace.podspec","README.md","LICENSE.md","scripts/*","scripts/api/*","scripts/core/*","scripts/api/model/*","scripts/util/*","typings/*","package.json","jsx-runtime.js"]}
|
package/scripts/Config.js
CHANGED
|
@@ -81,9 +81,9 @@ export declare const Dynatrace: {
|
|
|
81
81
|
* in case of manual startup and will be ignored in auto startup scenarios. The start method will
|
|
82
82
|
* set the error handler for reporting crashes and will apply the provided configuration globally.
|
|
83
83
|
*
|
|
84
|
-
* @param {
|
|
84
|
+
* @param {IConfiguration} configuration Configuration for a manual startup of the plugin
|
|
85
85
|
*/
|
|
86
|
-
start(configuration:
|
|
86
|
+
start(configuration: IConfiguration): Promise<void>;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* This call allows to monitor the passed in component. Depending on the type of the component
|
|
@@ -463,6 +463,47 @@ export declare interface IDynatraceRootAction extends IDynatraceAction {
|
|
|
463
463
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
+
/**
|
|
467
|
+
* Class which gives you the option to measure a web request
|
|
468
|
+
*/
|
|
469
|
+
export declare class DynatraceWebRequestTiming {
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Constructor for creation of a Web Request Timing object
|
|
473
|
+
* @param {string} requestTag The request tag used for the timing object.
|
|
474
|
+
* @param {string} url The URL of the request that is tagged and timed.
|
|
475
|
+
*/
|
|
476
|
+
constructor(requestTag: string, url: string);
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Start the measurment of the web request. Call this before the request is started.
|
|
480
|
+
*/
|
|
481
|
+
startWebRequestTiming(): void;
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Stops the measurment of the web request. This needs to be called after the request is executed.
|
|
485
|
+
* The responseCode and responseMessage will be transfered and shown in the web UI.
|
|
486
|
+
*
|
|
487
|
+
* @param {number} responseCode Status Code of the response e.g. 200
|
|
488
|
+
* @param {string} responseMessage Message of the response
|
|
489
|
+
*/
|
|
490
|
+
stopWebRequestTiming(responseCode: number, responseMessage: string): void;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Returns the content for the header that is needed in order to track a request
|
|
494
|
+
*
|
|
495
|
+
* @returns {string} header tag which should be applied onto the request
|
|
496
|
+
*/
|
|
497
|
+
getRequestTag(): string;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Returns the name for the header that is needed in order to track a request
|
|
501
|
+
*
|
|
502
|
+
* @returns {string} name of the header that should be used for tagging a request
|
|
503
|
+
*/
|
|
504
|
+
getRequestTagHeader(): string;
|
|
505
|
+
}
|
|
506
|
+
|
|
466
507
|
/**
|
|
467
508
|
* Represents the privacy settings that the user can select
|
|
468
509
|
*/
|
|
@@ -504,10 +545,75 @@ export declare class UserPrivacyOptions {
|
|
|
504
545
|
set crashReportingOptedIn(crashReportingOptedIn: boolean);
|
|
505
546
|
}
|
|
506
547
|
|
|
548
|
+
/**
|
|
549
|
+
* Configuration interface which should be used during a manual startup
|
|
550
|
+
*/
|
|
551
|
+
export declare interface IConfiguration {
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Beacon url which is used for communicate with the beacon endpoint. This value is mandatory.
|
|
555
|
+
*
|
|
556
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
557
|
+
* native agent configuration.
|
|
558
|
+
*/
|
|
559
|
+
readonly beaconUrl: string;
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Needed to identify and report data for this application. This value is mandatory.
|
|
563
|
+
*
|
|
564
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
565
|
+
* native agent configuration.
|
|
566
|
+
*/
|
|
567
|
+
readonly applicationId: string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Enables reporting of crashes. By default this value is true if nothing is passed.
|
|
571
|
+
*
|
|
572
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
573
|
+
* native agent configuration.
|
|
574
|
+
*/
|
|
575
|
+
readonly reportCrash: boolean;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Log level of our plugin during application runtime. By default this values is LogLevel.Info, if nothing is passed.
|
|
579
|
+
*/
|
|
580
|
+
readonly logLevel: LogLevel;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Decide if you want to see update cycles on lifecycle actions as well.
|
|
584
|
+
* By default this value is false, if nothing is passed. Be aware as this creates a lot more data.
|
|
585
|
+
*/
|
|
586
|
+
readonly lifecycleUpdate: boolean;
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Activates the privacy mode when set to true. User consent must be queried and set.
|
|
590
|
+
* The privacy settings for data collection and crash reporting can be changed via OneAgent SDK
|
|
591
|
+
* for Mobile as described under Data privacy. By default this value is false, if nothing is passed.
|
|
592
|
+
*
|
|
593
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
594
|
+
* native agent configuration.
|
|
595
|
+
*/
|
|
596
|
+
readonly userOptIn: boolean;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Activates a privacy mode especially for Touchables and Buttons. Setting this option to true
|
|
600
|
+
* means that a name for the control will no longer be shown, e.g. "Touch on Button".
|
|
601
|
+
* When setting a dtActionName onto the component this setting will be ignored. By default this value is false,
|
|
602
|
+
* if nothing is passed.
|
|
603
|
+
*/
|
|
604
|
+
readonly actionNamePrivacy: boolean;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Will define the bundle name which will prefix internal action ids.
|
|
608
|
+
*/
|
|
609
|
+
readonly bundleName?: string;
|
|
610
|
+
}
|
|
611
|
+
|
|
507
612
|
/**
|
|
508
613
|
* Manual startup configuration which is used for Dynatrace.start()
|
|
614
|
+
* @deprecated Use ConfigurationBuilder and IConfiguration instead
|
|
509
615
|
*/
|
|
510
|
-
export declare class ManualStartupConfiguration {
|
|
616
|
+
export declare class ManualStartupConfiguration implements IConfiguration {
|
|
511
617
|
/**
|
|
512
618
|
* Creates a Manual Startup configuration instance
|
|
513
619
|
*
|
|
@@ -519,8 +625,129 @@ export declare class ManualStartupConfiguration {
|
|
|
519
625
|
* @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
|
|
520
626
|
* @param {boolean} actionNamePrivacy Activates a privacy mode especially for Touchables and Buttons. Setting this option to true means that a name for the control will no longer be shown, e.g. "Touch on Button". When setting a dtActionName onto the component this setting will be ignored.
|
|
521
627
|
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
628
|
+
*
|
|
629
|
+
* @deprecated Use ConfigurationBuilder and IConfiguration instead
|
|
522
630
|
*/
|
|
523
631
|
constructor(beaconUrl: string, applicationId: string, reportCrash?: boolean,
|
|
524
632
|
logLevel?: LogLevel, lifecycleUpdate?: boolean, userOptIn?: boolean,
|
|
525
633
|
actionNamePrivacy?: boolean, bundleName?: string);
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Beacon url which is used for communicate with the beacon endpoint. This value is mandatory.
|
|
637
|
+
*
|
|
638
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
639
|
+
* native agent configuration.
|
|
640
|
+
*/
|
|
641
|
+
readonly beaconUrl: string;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Needed to identify and report data for this application. This value is mandatory.
|
|
645
|
+
*
|
|
646
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
647
|
+
* native agent configuration.
|
|
648
|
+
*/
|
|
649
|
+
readonly applicationId: string;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Enables reporting of crashes. By default this value is true if nothing is passed.
|
|
653
|
+
*
|
|
654
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
655
|
+
* native agent configuration.
|
|
656
|
+
*/
|
|
657
|
+
readonly reportCrash: boolean;
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Log level of our plugin during application runtime. By default this values is LogLevel.Info, if nothing is passed.
|
|
661
|
+
*/
|
|
662
|
+
readonly logLevel: LogLevel;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Decide if you want to see update cycles on lifecycle actions as well.
|
|
666
|
+
* By default this value is false, if nothing is passed. Be aware as this creates a lot more data.
|
|
667
|
+
*/
|
|
668
|
+
readonly lifecycleUpdate: boolean;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Activates the privacy mode when set to true. User consent must be queried and set.
|
|
672
|
+
* The privacy settings for data collection and crash reporting can be changed via OneAgent SDK
|
|
673
|
+
* for Mobile as described under Data privacy. By default this value is false, if nothing is passed.
|
|
674
|
+
*
|
|
675
|
+
* Be aware this value is only important for manual startup. In case of auto startup this needs to be handled via
|
|
676
|
+
* native agent configuration.
|
|
677
|
+
*/
|
|
678
|
+
readonly userOptIn: boolean;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Activates a privacy mode especially for Touchables and Buttons. Setting this option to true
|
|
682
|
+
* means that a name for the control will no longer be shown, e.g. "Touch on Button".
|
|
683
|
+
* When setting a dtActionName onto the component this setting will be ignored. By default this value is false,
|
|
684
|
+
* if nothing is passed.
|
|
685
|
+
*/
|
|
686
|
+
readonly actionNamePrivacy: boolean;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Will define the bundle name which will prefix internal action ids.
|
|
690
|
+
*/
|
|
691
|
+
readonly bundleName?: string;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Builder for Manual startup configuration which is used for Dynatrace.start()
|
|
696
|
+
*/
|
|
697
|
+
export declare class ConfigurationBuilder {
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Creates a builder for Manual Startup configuration
|
|
701
|
+
*
|
|
702
|
+
* @param {string} beaconUrl Identifies your environment within Dynatrace. This property is mandatory for manual startup
|
|
703
|
+
* @param {string} applicationId Identifies your mobile app. This property is mandatory for manual startup
|
|
704
|
+
*/
|
|
705
|
+
constructor(beaconUrl: string, applicationId: string);
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Builder function to handle crash reporting property
|
|
709
|
+
*
|
|
710
|
+
* @param {boolean} reportCrash Allows reporting React Native crashes.
|
|
711
|
+
*/
|
|
712
|
+
public withCrashReporting(reportCrash: boolean): ConfigurationBuilder;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Builder function to handle loglevel property
|
|
716
|
+
*
|
|
717
|
+
* @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.
|
|
718
|
+
*/
|
|
719
|
+
public withLogLevel(logLevel: LogLevel): ConfigurationBuilder;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Builder function to handle lifecycle update property
|
|
723
|
+
*
|
|
724
|
+
* @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.
|
|
725
|
+
*/
|
|
726
|
+
public withLifecycleUpdate(lifecycleUpdate: boolean): ConfigurationBuilder
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Builder function to handle user opt in property
|
|
730
|
+
*
|
|
731
|
+
* @param {boolean} userOptIn Activates the privacy mode when set to `true`. User consent must be queried and set.
|
|
732
|
+
*/
|
|
733
|
+
public withUserOptIn(userOptIn: boolean): ConfigurationBuilder;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Builder function to handle action name privacy property
|
|
737
|
+
*
|
|
738
|
+
* @param {boolean} actionNamePrivacy Activates a privacy mode especially for Touchables and Buttons. Setting this option to true means that a name for the control will no longer be shown, e.g. "Touch on Button". When setting a dtActionName onto the component this setting will be ignored.
|
|
739
|
+
*/
|
|
740
|
+
public withActionNamePrivacy(actionNamePrivacy: boolean): ConfigurationBuilder;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Builder function to handle bundle name property
|
|
744
|
+
*
|
|
745
|
+
* @param {string} bundleName Will define the bundle name which will prefix internal action ids.
|
|
746
|
+
*/
|
|
747
|
+
public withBundleName(bundleName: string): ConfigurationBuilder;
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Build configuration which is used for startup
|
|
751
|
+
*/
|
|
752
|
+
public buildConfiguration(): IConfiguration;
|
|
526
753
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutoStartupConfiguration = void 0;
|
|
4
|
-
const ConfigurationDefaults_1 = require("./ConfigurationDefaults");
|
|
5
|
-
class AutoStartupConfiguration {
|
|
6
|
-
constructor(optionalAutoStartParameters) {
|
|
7
|
-
this.lifecycleUpdate = ConfigurationDefaults_1.DEFAULT_LIFECYCLE_UPDATE_AUTO;
|
|
8
|
-
this.logLevel = ConfigurationDefaults_1.DEFAULT_LOGLEVEL_AUTO;
|
|
9
|
-
this.actionNamePrivacy = ConfigurationDefaults_1.DEFAULT_ACTION_NAME_PRIVACY;
|
|
10
|
-
this.bundleName = ConfigurationDefaults_1.DEFAULT_BUNDLE_NAME_AUTO;
|
|
11
|
-
if (optionalAutoStartParameters === undefined) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (optionalAutoStartParameters.lifecycleUpdate !== undefined) {
|
|
15
|
-
this.lifecycleUpdate = optionalAutoStartParameters.lifecycleUpdate;
|
|
16
|
-
}
|
|
17
|
-
if (optionalAutoStartParameters.logLevel !== undefined) {
|
|
18
|
-
this.logLevel = optionalAutoStartParameters.logLevel;
|
|
19
|
-
}
|
|
20
|
-
if (optionalAutoStartParameters.actionNamePrivacy !== undefined) {
|
|
21
|
-
this.actionNamePrivacy = optionalAutoStartParameters.actionNamePrivacy;
|
|
22
|
-
}
|
|
23
|
-
if (optionalAutoStartParameters.bundleName !== undefined) {
|
|
24
|
-
this.bundleName = optionalAutoStartParameters.bundleName;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.AutoStartupConfiguration = AutoStartupConfiguration;
|
/package/lib/instrumentor/base/configuration/{interface/IManualConfiguration.js → IConfiguration.js}
RENAMED
|
File without changes
|