@dynatrace/react-native-plugin 2.305.1 → 2.309.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 +21 -10
- package/android/build.gradle +3 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceAppStartModule.kt +128 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceInternalModule.kt +22 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.kt +411 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.kt +54 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceUtils.kt +86 -0
- package/android/src/main/java/com/dynatrace/android/agent/model/AppStartMeasurement.kt +15 -0
- package/android/src/main/java/com/dynatrace/android/agent/model/AppStartMeasurementType.kt +18 -0
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +228 -0
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +258 -0
- package/files/plugin.gradle +1 -1
- package/index.js +10 -10
- package/instrumentation/DynatraceInstrumentation.js +1 -0
- package/{lib → instrumentation/jsx}/CreateElement.js +6 -5
- package/{lib/instrumentor/base → instrumentation/jsx}/ElementHelper.js +14 -12
- package/{lib/jsx-dev-runtime.js → instrumentation/jsx/JsxDevRuntime.js} +10 -19
- package/instrumentation/jsx/JsxRuntime.js +63 -0
- package/instrumentation/jsx/JsxRuntimeUtil.js +31 -0
- package/instrumentation/jsx/components/ClassComponent.js +49 -0
- package/instrumentation/jsx/components/ComponentUtil.js +33 -0
- package/instrumentation/jsx/components/FunctionalComponent.js +20 -0
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Picker.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/RefreshControl.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Switch.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Touchable.js +5 -5
- package/instrumentation/libs/community/Picker.InstrInfo.js +20 -0
- package/{lib → instrumentation/libs}/community/Picker.js +1 -1
- package/instrumentation/libs/community/gesture-handler/Touchables.InstrInfo.js +23 -0
- package/{lib → instrumentation/libs}/community/gesture-handler/Touchables.js +1 -1
- package/{lib → instrumentation/libs}/react-native/RefreshControl.InstrInfo.js +2 -2
- package/{lib → instrumentation/libs}/react-native/RefreshControl.js +5 -5
- package/{lib → instrumentation/libs}/react-native/Switch.InstrInfo.js +2 -2
- package/{lib → instrumentation/libs}/react-native/Switch.js +5 -5
- package/instrumentation/libs/react-native/Touchables.InstrInfo.js +25 -0
- package/{lib → instrumentation/libs}/react-native/Touchables.js +1 -1
- package/{lib → instrumentation/libs}/react-navigation/ReactNavigation.js +6 -5
- package/{lib/instrumentor → instrumentation}/model/Types.js +1 -14
- package/instrumentation/model/TypesUtil.js +17 -0
- package/ios/DynatraceRNBridge.h +10 -1
- package/ios/DynatraceRNBridge.mm +152 -0
- package/jsx-dev-runtime.js +1 -1
- package/jsx-runtime.js +1 -1
- package/lib/core/Application.js +20 -0
- package/lib/{instrumentor/base → core}/Dynatrace.js +57 -48
- package/lib/{instrumentor/base → core}/DynatraceAction.js +23 -22
- package/lib/core/DynatraceInternal.js +46 -0
- package/lib/{instrumentor/base → core}/DynatraceRootAction.js +5 -4
- package/lib/{instrumentor/base → core}/DynatraceWebRequestTiming.js +6 -5
- package/lib/{instrumentor/base → core}/ErrorHandler.js +6 -5
- package/lib/{instrumentor/base → core}/configuration/Configuration.js +1 -1
- package/lib/{instrumentor/base → core}/configuration/ConfigurationDefaults.js +1 -2
- package/lib/{instrumentor/base → core}/configuration/ConfigurationHandler.js +2 -2
- package/lib/{instrumentor/base → core}/configuration/ManualStartupConfiguration.js +1 -1
- package/lib/core/logging/ConsoleLogger.js +27 -0
- package/lib/core/logging/LogLevel.js +12 -0
- package/lib/dynatrace-transformer.js +1 -1
- package/lib/next/Dynatrace.js +86 -0
- package/lib/next/DynatraceSecondGenForwarder.js +17 -0
- package/lib/next/IDynatrace.js +2 -0
- package/lib/next/IDynatraceForwarder.js +2 -0
- package/lib/next/appstart/AppStartObserver.js +32 -0
- package/lib/next/appstart/AppStartType.js +38 -0
- package/lib/next/events/EventCreator.js +77 -0
- package/lib/next/events/EventPipeline.js +57 -0
- package/lib/next/events/EventTimestamp.js +24 -0
- package/lib/next/events/ViewInfoCreator.js +27 -0
- package/lib/next/events/modifier/BaseDataEventModifier.js +31 -0
- package/lib/next/events/modifier/EventLimitation.js +69 -0
- package/lib/next/events/modifier/EventModifierUtil.js +88 -0
- package/lib/next/events/modifier/IEventModifier.js +2 -0
- package/lib/next/events/modifier/ModifyEventValidation.js +187 -0
- package/lib/next/events/modifier/NonFiniteNumbersModifier.js +50 -0
- package/lib/next/events/modifier/SendEventValidation.js +84 -0
- package/lib/next/events/spec/EventFieldKeysEnum.js +2 -0
- package/lib/next/events/spec/EventSpecContstants.js +46 -0
- package/lib/next/events/spec/IAppStartEvent.js +2 -0
- package/lib/next/events/spec/ICrashEvent.js +2 -0
- package/lib/next/events/spec/IErrorCodeEvent.js +2 -0
- package/lib/next/events/spec/IErrorExceptionEvent.js +2 -0
- package/lib/next/events/spec/IReactNativeEvent.js +2 -0
- package/lib/next/events/spec/IRumEvent.js +2 -0
- package/lib/next/provider/ITimestampProvider.js +2 -0
- package/lib/next/provider/TimestampProvider.js +10 -0
- package/package.json +51 -40
- package/react-native-dynatrace.podspec +1 -1
- package/src/lib/{instrumentor/base → core}/interface/NativeDynatraceBridge.ts +10 -0
- package/typings/react-native-dynatrace.d.ts +0 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.java +0 -362
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.java +0 -67
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceUtils.java +0 -76
- package/android/src/main/java/com/dynatrace/android/agent/PrivateDTBridge.java +0 -28
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -187
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -189
- package/lib/community/Picker.InstrInfo.js +0 -20
- package/lib/community/gesture-handler/Touchables.InstrInfo.js +0 -56
- package/lib/instrumentor/DynatraceInstrumentation.js +0 -1
- package/lib/instrumentor/base/Application.js +0 -16
- package/lib/instrumentor/base/DynatraceInternal.js +0 -34
- package/lib/instrumentor/base/Logger.js +0 -16
- package/lib/instrumentor/base/model/LogLevel.js +0 -17
- package/lib/jsx-runtime.js +0 -69
- package/lib/react/Component.js +0 -90
- package/lib/react-native/Touchables.InstrInfo.js +0 -60
- /package/{lib/instrumentor/base/interface → instrumentation/jsx}/IDynatraceProperties.js +0 -0
- /package/{lib → instrumentation/libs}/community/gesture-handler/index.js +0 -0
- /package/{lib → instrumentation/libs}/gesture-handler.js +0 -0
- /package/{lib → instrumentation/libs}/react-native/index.js +0 -0
- /package/{lib → instrumentation/libs}/react-native.js +0 -0
- /package/{lib/instrumentor → instrumentation}/model/Reference.js +0 -0
- /package/{lib/instrumentor → instrumentation}/parser/Babel.js +0 -0
- /package/lib/{instrumentor/base → core}/DynatraceBridge.js +0 -0
- /package/lib/{instrumentor/base → core}/NullAction.js +0 -0
- /package/lib/{instrumentor/base → core}/NullRootAction.js +0 -0
- /package/lib/{instrumentor/base → core}/NullWebRequestTiming.js +0 -0
- /package/lib/{instrumentor/base → core}/UserPrivacyOptions.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/ConfigurationBuilder.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/ConfigurationPreset.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/IConfiguration.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatrace.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceAction.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceInternal.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceRootAction.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IWebRequestTiming.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/NativeDynatraceBridge.js +0 -0
- /package/lib/{instrumentor/base/interface → core/logging}/ILogger.js +0 -0
- /package/lib/{instrumentor/base → core}/model/DataCollectionLevel.js +0 -0
- /package/lib/{instrumentor/base → core}/model/Json.js +0 -0
- /package/lib/{instrumentor/base → core}/model/Platform.js +0 -0
- /package/lib/{instrumentor/base → core}/util/StringUtils.js +0 -0
package/lib/react/Component.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DynatraceClassWrapper = exports.DynatraceFnWrapper = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const ConfigurationHandler_1 = require("../instrumentor/base/configuration/ConfigurationHandler");
|
|
6
|
-
const Logger_1 = require("../instrumentor/base/Logger");
|
|
7
|
-
const NullAction_1 = require("../instrumentor/base/NullAction");
|
|
8
|
-
const Dynatrace_1 = require("../instrumentor/base/Dynatrace");
|
|
9
|
-
const DynatraceFnWrapper = (props) => {
|
|
10
|
-
const componentName = getNameFromComponent(props);
|
|
11
|
-
const action = Dynatrace_1.Dynatrace.enterAutoAction(`Render ${componentName}`);
|
|
12
|
-
if (action instanceof NullAction_1.NullAction) {
|
|
13
|
-
Logger_1.Logger.logInfo(`Component ${componentName}: React Native plugin has not been started yet! Component will not be reported!`);
|
|
14
|
-
}
|
|
15
|
-
(0, react_1.useEffect)(() => {
|
|
16
|
-
action.leaveAction();
|
|
17
|
-
});
|
|
18
|
-
return props.children;
|
|
19
|
-
};
|
|
20
|
-
exports.DynatraceFnWrapper = DynatraceFnWrapper;
|
|
21
|
-
class DynatraceClassWrapper extends react_1.Component {
|
|
22
|
-
constructor(props) {
|
|
23
|
-
super(props);
|
|
24
|
-
this.wrappingName = getNameFromComponent(props);
|
|
25
|
-
this.componentMounted = false;
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
29
|
-
Logger_1.Logger.logInfo(`Component ${this.wrappingName}: React Native plugin has not been started yet! Component will not be reported!`);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
if ((this.componentMounted &&
|
|
33
|
-
ConfigurationHandler_1.ConfigurationHandler.isLifecycleUpdateEnabled()) ||
|
|
34
|
-
!this.componentMounted) {
|
|
35
|
-
const actionPrefix = !this.componentMounted
|
|
36
|
-
? 'Render '
|
|
37
|
-
: 'Update ';
|
|
38
|
-
this.internalAction = Dynatrace_1.Dynatrace.enterAutoAction(actionPrefix + this.wrappingName);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return this.props.children;
|
|
42
|
-
}
|
|
43
|
-
componentWillUnmount() {
|
|
44
|
-
this.componentMounted = false;
|
|
45
|
-
}
|
|
46
|
-
componentDidUpdate() {
|
|
47
|
-
this.reportFunctionEvent('componentDidUpdate()');
|
|
48
|
-
}
|
|
49
|
-
componentDidMount() {
|
|
50
|
-
this.componentMounted = true;
|
|
51
|
-
this.reportFunctionEvent('componentDidMount()');
|
|
52
|
-
}
|
|
53
|
-
reportFunctionEvent(event) {
|
|
54
|
-
if (this.internalAction !== undefined) {
|
|
55
|
-
this.internalAction.reportEvent(`${this.wrappingName}.${event}`);
|
|
56
|
-
this.internalAction.leaveAction();
|
|
57
|
-
this.internalAction = undefined;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.DynatraceClassWrapper = DynatraceClassWrapper;
|
|
62
|
-
const getNameFromComponent = (props) => {
|
|
63
|
-
if (props !== undefined && props.children !== undefined) {
|
|
64
|
-
let child;
|
|
65
|
-
if (Array.isArray(props.children) && props.children.length === 1) {
|
|
66
|
-
child = props.children[0];
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
child = props.children;
|
|
70
|
-
}
|
|
71
|
-
if (child.props !== undefined &&
|
|
72
|
-
child.props.dtActionName !== undefined) {
|
|
73
|
-
return child.props.dtActionName;
|
|
74
|
-
}
|
|
75
|
-
else if (child.type !== undefined) {
|
|
76
|
-
if (child.type.displayName !== undefined) {
|
|
77
|
-
return child.type.displayName;
|
|
78
|
-
}
|
|
79
|
-
else if (child.type._dtInfo !== undefined) {
|
|
80
|
-
return child.type._dtInfo.name;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return child.type.name;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
return 'Undefined Name';
|
|
89
|
-
}
|
|
90
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.instrumentationInfo = void 0;
|
|
4
|
-
exports.instrumentationInfo = [];
|
|
5
|
-
exports.instrumentationInfo.push({
|
|
6
|
-
old: { module: 'react-native', reference: 'TouchableHighlight' },
|
|
7
|
-
new: {
|
|
8
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
9
|
-
reference: 'TouchableHighlight',
|
|
10
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
exports.instrumentationInfo.push({
|
|
14
|
-
old: { module: 'react-native', reference: 'TouchableOpacity' },
|
|
15
|
-
new: {
|
|
16
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
17
|
-
reference: 'TouchableOpacity',
|
|
18
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
exports.instrumentationInfo.push({
|
|
22
|
-
old: { module: 'react-native', reference: 'TouchableNativeFeedback' },
|
|
23
|
-
new: {
|
|
24
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
25
|
-
reference: 'TouchableNativeFeedback',
|
|
26
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
exports.instrumentationInfo.push({
|
|
30
|
-
old: { module: 'react-native', reference: 'TouchableWithoutFeedback' },
|
|
31
|
-
new: {
|
|
32
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
33
|
-
reference: 'TouchableWithoutFeedback',
|
|
34
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
exports.instrumentationInfo.push({
|
|
38
|
-
old: { module: 'react-native', reference: 'Button' },
|
|
39
|
-
new: {
|
|
40
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
41
|
-
reference: 'Button',
|
|
42
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
exports.instrumentationInfo.push({
|
|
46
|
-
old: { module: 'react-native', reference: 'Text' },
|
|
47
|
-
new: {
|
|
48
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
49
|
-
reference: 'Text',
|
|
50
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
exports.instrumentationInfo.push({
|
|
54
|
-
old: { module: 'react-native', reference: 'Pressable' },
|
|
55
|
-
new: {
|
|
56
|
-
module: '@dynatrace/react-native-plugin/lib/react-native/',
|
|
57
|
-
reference: 'Pressable',
|
|
58
|
-
defaultImport: '@dynatrace/react-native-plugin/lib/react-native',
|
|
59
|
-
},
|
|
60
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|