@dynatrace/react-native-plugin 2.299.1 → 2.301.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.
Files changed (33) hide show
  1. package/README.md +42 -13
  2. package/android/build.gradle +1 -1
  3. package/files/plugin.gradle +1 -1
  4. package/ios/DynatraceRNBridge.mm +1 -3
  5. package/lib/CreateElement.js +2 -1
  6. package/lib/community/gesture-handler/Touchables.InstrInfo.js +16 -4
  7. package/lib/community/gesture-handler/Touchables.js +7 -2
  8. package/lib/instrumentor/base/Dynatrace.js +10 -3
  9. package/lib/instrumentor/base/DynatraceBridge.js +6 -2
  10. package/lib/instrumentor/base/DynatraceRootAction.js +4 -1
  11. package/lib/instrumentor/base/DynatraceWebRequestTiming.js +6 -3
  12. package/lib/instrumentor/base/ElementHelper.js +11 -5
  13. package/lib/instrumentor/base/ErrorHandler.js +1 -1
  14. package/lib/instrumentor/base/Logger.js +2 -1
  15. package/lib/instrumentor/base/Picker.js +7 -6
  16. package/lib/instrumentor/base/RefreshControl.js +3 -1
  17. package/lib/instrumentor/base/Switch.js +3 -3
  18. package/lib/instrumentor/base/Touchable.js +9 -8
  19. package/lib/instrumentor/base/configuration/Configuration.js +12 -10
  20. package/lib/instrumentor/base/configuration/ConfigurationPreset.js +0 -1
  21. package/lib/instrumentor/base/configuration/IConfiguration.js +0 -1
  22. package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +3 -3
  23. package/lib/instrumentor/base/interface/IDynatraceProperties.js +3 -3
  24. package/lib/instrumentor/model/Types.js +10 -11
  25. package/lib/jsx-dev-runtime.js +16 -6
  26. package/lib/jsx-runtime.js +21 -7
  27. package/lib/metro/getSourceMapInfo.js +2 -1
  28. package/lib/react/Component.js +7 -3
  29. package/lib/react-native/Touchables.js +6 -4
  30. package/lib/react-navigation/ReactNavigation.js +6 -2
  31. package/package.json +175 -171
  32. package/react-native-dynatrace.podspec +1 -1
  33. package/src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts +150 -78
@@ -6,88 +6,160 @@ import { TurboModuleRegistry } from 'react-native';
6
6
  import { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
7
7
 
8
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, platform?: string): void;
37
-
38
- storeCrash(errorName: string, reason: string, stacktrace: 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
- stopWebRequestTimingWithSize(requestTag: string, url: string, responseCode: number, responseMessage: string,
84
- requestSize: number, responseSize: number): void;
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(
24
+ name: string,
25
+ key: string,
26
+ parentKey: string,
27
+ platform?: string,
28
+ ): void;
29
+
30
+ leaveAction(key: string, leave: boolean, platform?: string): void;
31
+
32
+ cancelAction(key: string, platfrom?: string): void;
33
+
34
+ endVisit(platform?: string): void;
35
+
36
+ reportErrorWithoutStacktrace(
37
+ errorName: string,
38
+ errorCode: number,
39
+ platform?: string,
40
+ ): void;
41
+
42
+ reportError(
43
+ errorName: string,
44
+ errorValue: string,
45
+ reason: string,
46
+ stacktrace: string,
47
+ platform?: string,
48
+ ): void;
49
+
50
+ // eslint-disable-next-line max-len
51
+ reportCrash(
52
+ errorName: string,
53
+ reason: string,
54
+ stacktrace: string,
55
+ isRealError: boolean,
56
+ platform?: string,
57
+ ): void;
58
+
59
+ storeCrash(errorName: string, reason: string, stacktrace: string): void;
60
+
61
+ reportErrorInAction(
62
+ key: string,
63
+ errorName: string,
64
+ errorCode: number,
65
+ platform?: string,
66
+ ): void;
67
+
68
+ reportValue(
69
+ key: string,
70
+ valueName: string,
71
+ value: string,
72
+ platform?: string,
73
+ ): void;
74
+
75
+ getRequestTag(key: string, url: string): Promise<string>;
76
+
77
+ identifyUser(user: string, plaform?: string): void;
78
+
79
+ reportEventInAction(
80
+ actionKey: string,
81
+ name: string,
82
+ platform?: string,
83
+ ): void;
84
+
85
+ reportStringValueInAction(
86
+ actionKey: string,
87
+ name: string,
88
+ value: string,
89
+ platform?: string,
90
+ ): void;
91
+
92
+ reportIntValueInAction(
93
+ actionKey: string,
94
+ name: string,
95
+ value: number,
96
+ platform?: string,
97
+ ): void;
98
+
99
+ reportDoubleValueInAction(
100
+ actionKey: string,
101
+ name: string,
102
+ value: number,
103
+ platform?: string,
104
+ ): void;
105
+
106
+ sendEvent(name: string, attributes: UnsafeObject, plaform?: string): void;
107
+
108
+ sendBizEvent(
109
+ type: string,
110
+ attributes: UnsafeObject,
111
+ plaform?: string,
112
+ ): void;
113
+
114
+ setGPSLocation(
115
+ latitude: number,
116
+ longitude: number,
117
+ platform?: string,
118
+ ): void;
119
+
120
+ flushEvents(platform?: string): void;
121
+
122
+ isCrashReportingOptedIn(platform?: string): Promise<boolean>;
123
+
124
+ setCrashReportingOptedIn(crashReporting: boolean, platform?: string): void;
125
+
126
+ setDataCollectionLevel(collectionLevel: string, platform?: string): void;
127
+
128
+ getDataCollectionLevel(platform?: string): Promise<string>;
129
+
130
+ // eslint-disable-next-line @typescript-eslint/ban-types
131
+ setBeaconHeaders(headers?: Object | null, platform?: string): void;
132
+
133
+ getUserPrivacyOptions(platform?: string): Promise<NativeUserPrivacyOptions>;
134
+
135
+ applyUserPrivacyOptions(
136
+ userPrivacyOptions: UnsafeObject,
137
+ platform?: string,
138
+ ): void;
139
+
140
+ startWebRequestTiming(requestTag: string, url: string): void;
141
+
142
+ stopWebRequestTiming(
143
+ requestTag: string,
144
+ url: string,
145
+ responseCode: number,
146
+ responseMessage: string,
147
+ ): void;
148
+
149
+ stopWebRequestTimingWithSize(
150
+ requestTag: string,
151
+ url: string,
152
+ responseCode: number,
153
+ responseMessage: string,
154
+ requestSize: number,
155
+ responseSize: number,
156
+ ): void;
85
157
  }
86
158
 
87
159
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
88
160
  export type NativeUserPrivacyOptions = {
89
- dataCollectionLevel: string;
90
- crashReportingOptedIn: boolean;
161
+ dataCollectionLevel: string;
162
+ crashReportingOptedIn: boolean;
91
163
  };
92
164
 
93
165
  export default TurboModuleRegistry.getEnforcing<Spec>('DynatraceBridge');