@dynatrace/react-native-plugin 2.279.3 → 2.283.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 +20 -9
- package/android/build.gradle +40 -6
- package/android/src/main/java/com/dynatrace/android/agent/{DynatraceRNBridge.java → DynatraceRNBridgeImpl.java} +15 -45
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.java +31 -13
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.java +187 -0
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.java +189 -0
- package/files/plugin.gradle +1 -1
- package/ios/DynatraceRNBridge.h +9 -1
- package/ios/DynatraceRNBridge.m +16 -1
- package/ios/lib/Dynatrace.xcframework/Info.plist +16 -8
- package/ios/lib/Dynatrace.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/lib/Dynatrace.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/ios/lib/Dynatrace.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/lib/Dynatrace.xcframework/_CodeSignature/CodeResources +1058 -0
- package/ios/lib/Dynatrace.xcframework/_CodeSignature/CodeSignature +0 -0
- 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 +106 -59
- 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/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -2
- 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 +3 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64/Dynatrace.framework/PrivacyInfo.xcprivacy +100 -0
- 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 +212 -118
- 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/arm64-apple-ios-simulator.private.swiftinterface +3 -2
- 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 +3 -2
- 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/Modules/Dynatrace.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -2
- 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 +3 -2
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/PrivacyInfo.xcprivacy +100 -0
- package/ios/lib/Dynatrace.xcframework/ios-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +40 -29
- 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 +106 -59
- 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/Dynatrace.framework/Modules/Dynatrace.swiftmodule/arm64-apple-tvos.private.swiftinterface +3 -2
- 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 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64/Dynatrace.framework/PrivacyInfo.xcprivacy +100 -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-Swift.h +212 -118
- 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/Modules/Dynatrace.swiftmodule/arm64-apple-tvos-simulator.private.swiftinterface +3 -2
- 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 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/Modules/Dynatrace.swiftmodule/x86_64-apple-tvos-simulator.private.swiftinterface +3 -2
- 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 -2
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/PrivacyInfo.xcprivacy +100 -0
- package/ios/lib/Dynatrace.xcframework/tvos-arm64_x86_64-simulator/Dynatrace.framework/_CodeSignature/CodeResources +36 -25
- package/lib/instrumentor/DynatraceInstrumentation.js +1 -1
- package/lib/instrumentor/base/Dynatrace.js +23 -23
- package/lib/instrumentor/base/DynatraceAction.js +7 -7
- package/lib/instrumentor/base/DynatraceBridge.js +4 -1
- package/lib/instrumentor/base/DynatraceInternal.js +2 -2
- package/lib/instrumentor/base/DynatraceRootAction.js +1 -1
- package/lib/instrumentor/base/ElementHelper.js +6 -3
- package/lib/instrumentor/base/Picker.js +40 -31
- package/lib/instrumentor/base/RefreshControl.js +29 -17
- package/lib/instrumentor/base/Switch.js +57 -0
- package/lib/instrumentor/base/Touchable.js +12 -12
- package/lib/instrumentor/base/interface/IDynatraceProperties.js +7 -0
- package/lib/instrumentor/base/interface/NativeDynatraceBridge.js +4 -0
- package/lib/instrumentor/base/model/DataCollectionLevel.js +21 -5
- package/lib/instrumentor/base/model/Platform.js +5 -2
- package/lib/instrumentor/model/Types.js +1 -0
- package/lib/react-native/Switch.InstrInfo.js +12 -0
- package/lib/react-native/Switch.js +15 -0
- package/lib/react-native/index.js +3 -1
- package/lib/react-native.js +2 -0
- package/package.json +175 -1
- package/react-native-dynatrace.podspec +25 -0
- package/scripts/Android.js +9 -1
- package/src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts +90 -0
- package/lib/instrumentor/base/interface/IDynatraceBridge.js +0 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'json'
|
|
2
2
|
package = JSON.parse(File.read(File.join(__dir__, './', 'package.json')))
|
|
3
3
|
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
4
6
|
Pod::Spec.new do |s|
|
|
5
7
|
|
|
6
8
|
# --- Metadata ---------------------------------------------------------- #
|
|
@@ -116,6 +118,29 @@ Pod::Spec.new do |s|
|
|
|
116
118
|
#
|
|
117
119
|
|
|
118
120
|
s.dependency "React"
|
|
121
|
+
|
|
122
|
+
# Allows for better compatibility for older and newer versions
|
|
123
|
+
if defined?(install_modules_dependencies)
|
|
124
|
+
install_modules_dependencies(s)
|
|
125
|
+
else
|
|
126
|
+
s.dependency "React-Core"
|
|
127
|
+
|
|
128
|
+
# The following lines are required by the New Architecture.
|
|
129
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
130
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
131
|
+
s.pod_target_xcconfig = {
|
|
132
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
133
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
134
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
135
|
+
}
|
|
136
|
+
s.dependency "React-Codegen"
|
|
137
|
+
s.dependency "RCT-Folly"
|
|
138
|
+
s.dependency "RCTRequired"
|
|
139
|
+
s.dependency "RCTTypeSafety"
|
|
140
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
119
144
|
end
|
|
120
145
|
|
|
121
146
|
|
package/scripts/Android.js
CHANGED
|
@@ -9,6 +9,7 @@ const GRADLE_CONFIG_IDENTIFIER = '// AUTO - INSERTED';
|
|
|
9
9
|
exports.GRADLE_DYNATRACE_FILE = 'apply from: "../node_modules/@dynatrace/react-native-plugin/files/dynatrace.gradle"';
|
|
10
10
|
const GRADLE_BUILDSCRIPT_IDENTIFIER = 'buildscript';
|
|
11
11
|
exports.GRADLE_APPLY_BUILDSCRIPT = 'apply from: "../node_modules/@dynatrace/react-native-plugin/files/plugin.gradle", to: buildscript';
|
|
12
|
+
const GRADLE_REACT_NATIVE_PLUGIN = 'apply plugin: "com.facebook.react.rootproject"';
|
|
12
13
|
const instrumentAndroidPlatform = (pathToGradle, remove) => {
|
|
13
14
|
const path = FileOperationHelper_1.default.checkIfFileExistsSync(pathToGradle);
|
|
14
15
|
if (!path.endsWith('.gradle')) {
|
|
@@ -72,7 +73,14 @@ const changeReactNativeBuildGradleFile = (pathToGradle, remove) => {
|
|
|
72
73
|
modified = true;
|
|
73
74
|
}
|
|
74
75
|
if (gradleDynatraceFileIndex === -1) {
|
|
75
|
-
|
|
76
|
+
let pluginLineIndex = -1;
|
|
77
|
+
for (let i = 0; i < gradleFileContentLines.length; i++) {
|
|
78
|
+
if (gradleFileContentLines[i].includes(GRADLE_REACT_NATIVE_PLUGIN)) {
|
|
79
|
+
pluginLineIndex = i;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
gradleFileContentLines.splice(pluginLineIndex !== -1 ? pluginLineIndex : gradleFileContentLines.length, 0, exports.GRADLE_DYNATRACE_FILE);
|
|
76
84
|
modified = true;
|
|
77
85
|
}
|
|
78
86
|
if (modified) {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
// eslint-disable-next-line no-duplicate-imports
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line import/no-internal-modules
|
|
6
|
+
import { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
|
|
8
|
+
export interface Spec extends TurboModule {
|
|
9
|
+
getConstants: () => {
|
|
10
|
+
DATA_COLLECTION_OFF: string;
|
|
11
|
+
DATA_COLLECTION_PERFORMANCE: string;
|
|
12
|
+
DATA_COLLECTION_USERBEHAVIOR: string;
|
|
13
|
+
PLATFORM_ANDROID: string;
|
|
14
|
+
PLATFORM_IOS: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
start(configuration: UnsafeObject): Promise<boolean>;
|
|
18
|
+
|
|
19
|
+
enterAction(name: string, key: string, platform?: string): void;
|
|
20
|
+
|
|
21
|
+
enterManualAction(name: string, key: string, platform?: string): void;
|
|
22
|
+
|
|
23
|
+
enterManualActionWithParent(name: string, key: string, parentKey: string, platform?: string): void;
|
|
24
|
+
|
|
25
|
+
leaveAction(key: string, leave: boolean, platform?: string): void;
|
|
26
|
+
|
|
27
|
+
cancelAction(key: string, platfrom?: string): void;
|
|
28
|
+
|
|
29
|
+
endVisit(platform?: string): void;
|
|
30
|
+
|
|
31
|
+
reportErrorWithoutStacktrace(errorName: string, errorCode: number, platform?: string): void;
|
|
32
|
+
|
|
33
|
+
reportError(errorName: string, errorValue: string, reason: string, stacktrace: string, platform?: string): void;
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line max-len
|
|
36
|
+
reportCrash(errorName: string, reason: string, stacktrace: string, isRealError: boolean, newSession: boolean, platform?: string): void;
|
|
37
|
+
|
|
38
|
+
storeCrash(errorName: string, reason: string, stacktrace: string, platform?: string): void;
|
|
39
|
+
|
|
40
|
+
reportErrorInAction(key: string, errorName: string, errorCode: number, platform?: string): void;
|
|
41
|
+
|
|
42
|
+
reportValue(key: string, valueName: string, value: string, platform?: string): void;
|
|
43
|
+
|
|
44
|
+
getRequestTag(key: string, url: string): Promise<string>;
|
|
45
|
+
|
|
46
|
+
identifyUser(user: string, plaform?: string): void;
|
|
47
|
+
|
|
48
|
+
reportEventInAction(actionKey: string, name: string, platform?: string): void;
|
|
49
|
+
|
|
50
|
+
reportStringValueInAction(actionKey: string, name: string, value: string, platform?: string): void;
|
|
51
|
+
|
|
52
|
+
reportIntValueInAction(actionKey: string, name: string, value: number, platform?: string): void;
|
|
53
|
+
|
|
54
|
+
reportDoubleValueInAction(actionKey: string, name: string, value: number, platform?: string): void;
|
|
55
|
+
|
|
56
|
+
sendEvent(name: string, attributes: UnsafeObject, plaform?: string): void;
|
|
57
|
+
|
|
58
|
+
sendBizEvent(type: string, attributes: UnsafeObject, plaform?: string): void;
|
|
59
|
+
|
|
60
|
+
setGPSLocation(latitude: number, longitude: number, platform?: string): void;
|
|
61
|
+
|
|
62
|
+
flushEvents(platform?: string): void;
|
|
63
|
+
|
|
64
|
+
isCrashReportingOptedIn(platform?: string): Promise<boolean>;
|
|
65
|
+
|
|
66
|
+
setCrashReportingOptedIn(crashReporting: boolean, platform?: string): void;
|
|
67
|
+
|
|
68
|
+
setDataCollectionLevel(collectionLevel: string, platform?: string): void;
|
|
69
|
+
|
|
70
|
+
getDataCollectionLevel(platform?: string): Promise<string>;
|
|
71
|
+
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
73
|
+
setBeaconHeaders(headers?: Object | null, platform?: string): void;
|
|
74
|
+
|
|
75
|
+
getUserPrivacyOptions(platform?: string): Promise<NativeUserPrivacyOptions>;
|
|
76
|
+
|
|
77
|
+
applyUserPrivacyOptions(userPrivacyOptions: UnsafeObject, platform?: string): void;
|
|
78
|
+
|
|
79
|
+
startWebRequestTiming(requestTag: string, url: string): void;
|
|
80
|
+
|
|
81
|
+
stopWebRequestTiming(requestTag: string, url: string, responseCode: number, responseMessage: string): void;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
85
|
+
export type NativeUserPrivacyOptions = {
|
|
86
|
+
dataCollectionLevel: string;
|
|
87
|
+
crashReportingOptedIn: boolean;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('DynatraceBridge');
|