@dynatrace/react-native-plugin 2.337.2 → 2.339.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.
Files changed (38) hide show
  1. package/README.md +11 -5
  2. package/android/build.gradle +1 -1
  3. package/files/default.config.js +2 -0
  4. package/files/plugin.gradle +1 -1
  5. package/instrumentation/jsx/components/ClassComponent.js +2 -1
  6. package/instrumentation/libs/UserInteraction.js +1 -1
  7. package/instrumentation/libs/react-navigation/ReactNavigation.js +7 -4
  8. package/instrumentation/libs/withOnPressMonitoring.js +5 -2
  9. package/lib/core/Application.js +5 -2
  10. package/lib/core/Dynatrace.js +113 -44
  11. package/lib/core/DynatraceAction.js +78 -21
  12. package/lib/core/DynatraceInternal.js +19 -4
  13. package/lib/core/DynatraceRootAction.js +6 -3
  14. package/lib/core/DynatraceWebRequestTiming.js +25 -4
  15. package/lib/core/ErrorHandler.js +9 -2
  16. package/lib/core/logging/ConsoleLogger.js +17 -6
  17. package/lib/core/logging/LogMessages.js +764 -0
  18. package/lib/core/logging/LogType.js +9 -0
  19. package/lib/features/ui-interaction/IUserInteractionEvent.js +1 -1
  20. package/lib/features/ui-interaction/Runtime.js +7 -3
  21. package/lib/next/Dynatrace.js +42 -22
  22. package/lib/next/appstart/AppStartObserver.js +7 -2
  23. package/lib/next/events/EventPipeline.js +12 -5
  24. package/lib/next/events/EventTimestamp.js +5 -1
  25. package/lib/next/events/ExceptionEventData.js +1 -1
  26. package/lib/next/events/HttpRequestEventData.js +16 -7
  27. package/lib/next/events/modifier/BaseDataEventModifier.js +4 -1
  28. package/lib/next/events/modifier/EventModifierUtil.js +12 -5
  29. package/lib/next/events/modifier/ModifyEventValidation.js +20 -7
  30. package/lib/next/events/modifier/SendEventValidation.js +10 -4
  31. package/lib/next/events/modifier/StringLengthEventModifier.js +4 -1
  32. package/lib/next/events/modifier/ValueRestrictionModifier.js +5 -1
  33. package/lib/next/events/spec/EventSpecContstants.js +6 -2
  34. package/lib/next/provider/TimestampProvider.js +1 -1
  35. package/lib/next/util/TraceContextUtils.js +4 -3
  36. package/package.json +5 -4
  37. package/react-native-dynatrace.podspec +1 -1
  38. package/scripts/Config.js +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALL_APP_START_KEYS = exports.EVENT_WHITELIST_SIZE = exports.MODIFY_EVENT_WHITELIST_NAMESPACE = exports.MODIFY_EVENT_WHITELIST_STRING_FIELDS = exports.MODIFY_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = exports.SEND_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_NAMESPACES = exports.SEND_EVENT_WHITELIST_NAMESPACES = exports.AllCharacteristicsKeys = exports.KEY_NAME_REGEX = exports.MAX_CUSTOM_EVENT_VALUE_LENGTH = exports.MAX_CUSTOM_EVENT_KEY_LENGTH = exports.MAX_CUSTOM_EVENT_FIELDS = exports.SPECIFICATION_VERSION = void 0;
3
+ exports.ALL_APP_START_KEYS = exports.EVENT_WHITELIST_SIZE = exports.MODIFY_EVENT_WHITELIST_NAMESPACE = exports.MODIFY_EVENT_WHITELIST_STRING_FIELDS = exports.MODIFY_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = exports.SEND_EXCEPTION_EVENT_WHITELIST_FIELDS = exports.SEND_EVENT_WHITELIST_FIELDS = exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_NAMESPACES = exports.SEND_EXCEPTION_EVENT_WHITELIST_NAMESPACES = exports.SEND_EVENT_WHITELIST_NAMESPACES = exports.AllCharacteristicsKeys = exports.KEY_NAME_REGEX = exports.MAX_CUSTOM_EVENT_VALUE_LENGTH = exports.MAX_CUSTOM_EVENT_KEY_LENGTH = exports.MAX_CUSTOM_EVENT_FIELDS = exports.SPECIFICATION_VERSION = void 0;
4
4
  exports.SPECIFICATION_VERSION = '0.23.0';
5
5
  exports.MAX_CUSTOM_EVENT_FIELDS = 50;
6
6
  exports.MAX_CUSTOM_EVENT_KEY_LENGTH = 100;
@@ -32,13 +32,17 @@ exports.AllCharacteristicsKeys = Object.keys(characteristicsKeyMap);
32
32
  exports.SEND_EVENT_WHITELIST_NAMESPACES = [
33
33
  "event_properties",
34
34
  ];
35
+ exports.SEND_EXCEPTION_EVENT_WHITELIST_NAMESPACES = [
36
+ "event_properties",
37
+ ];
35
38
  exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_NAMESPACES = [
36
39
  "session_properties",
37
40
  ];
38
41
  exports.SEND_EVENT_WHITELIST_FIELDS = [
39
42
  "duration",
40
43
  ];
41
- exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = exports.SEND_EVENT_WHITELIST_FIELDS;
44
+ exports.SEND_EXCEPTION_EVENT_WHITELIST_FIELDS = [];
45
+ exports.SEND_SESSION_PROPERTY_EVENT_WHITELIST_FIELDS = [];
42
46
  exports.MODIFY_EVENT_WHITELIST_FIELDS = [
43
47
  "exception.stack_trace",
44
48
  "url.full",
@@ -18,6 +18,6 @@ exports.defaultTimestampProvider = {
18
18
  baseMonotonicMs = currentMonotonicMs;
19
19
  return baseRealtimeMs;
20
20
  }
21
- return baseRealtimeMs + (currentMonotonicMs - baseMonotonicMs);
21
+ return Math.trunc(baseRealtimeMs + (currentMonotonicMs - baseMonotonicMs));
22
22
  },
23
23
  };
@@ -2,22 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trimTraceState = exports.generateTracestate = exports.generateTraceparentHeader = exports.parseTraceparent = void 0;
4
4
  const ConsoleLogger_1 = require("../../core/logging/ConsoleLogger");
5
+ const LogMessages_1 = require("../../core/logging/LogMessages");
5
6
  const ConfigurationHandler_1 = require("../../core/configuration/ConfigurationHandler");
6
7
  const logger = new ConsoleLogger_1.ConsoleLogger('TraceContextUtils');
7
8
  const parseTraceparent = (traceparent) => {
8
9
  const traceparentRegex = /^[0-9a-f]{2}-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})$/i;
9
10
  const match = traceparentRegex.exec(traceparent);
10
11
  if (!match) {
11
- logger.debug("The traceparent header doesn't match the format: '<version-2-hex>-<trace-id-32-hex>-<parent-id-16-hex>-<flags-2-hex>'");
12
+ logger.debug(LogMessages_1.LogMessage.HTTP_REQUEST_TRACEPARENT_FORMAT_INVALID);
12
13
  return undefined;
13
14
  }
14
15
  const [, traceId, parentId] = match;
15
16
  if (allZeros(traceId)) {
16
- logger.debug('Trace ID in traceparent header must not be all zeros');
17
+ logger.debug(LogMessages_1.LogMessage.HTTP_REQUEST_TRACEPARENT_TRACE_ID_ZEROS);
17
18
  return undefined;
18
19
  }
19
20
  if (allZeros(parentId)) {
20
- logger.debug('Parent ID in traceparent header must not be all zeros');
21
+ logger.debug(LogMessages_1.LogMessage.HTTP_REQUEST_TRACEPARENT_PARENT_ID_ZEROS);
21
22
  return undefined;
22
23
  }
23
24
  return { traceId, parentId };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/react-native-plugin",
3
- "version": "2.337.2",
3
+ "version": "2.339.1",
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": "types.d.ts",
@@ -49,11 +49,11 @@
49
49
  "author": "Dynatrace",
50
50
  "license": "SEE LICENSE IN LICENSE.md",
51
51
  "dependencies": {
52
- "@babel/runtime": "^7.29.2",
52
+ "@babel/runtime": "^7.29.7",
53
53
  "jscodeshift": "^17.3.0",
54
54
  "plist": "^3.1.0",
55
55
  "proxy-polyfill": "^0.3.2",
56
- "semver": "^7.8.0"
56
+ "semver": "^7.8.3"
57
57
  },
58
58
  "homepage": "https://www.dynatrace.com/",
59
59
  "peerDependencies": {
@@ -67,7 +67,8 @@
67
67
  "ast-types": "npm:ast-types-x"
68
68
  },
69
69
  "ast-types": "npm:ast-types-x",
70
- "flow-parser": "0.160"
70
+ "flow-parser": "0.160",
71
+ "tmp": ">=0.2.6"
71
72
  },
72
73
  "devDependencies": {
73
74
  "@babel/plugin-transform-class-properties": "^7.27.1",
@@ -111,7 +111,7 @@ Pod::Spec.new do |s|
111
111
  #
112
112
 
113
113
  s.dependency "React"
114
- s.dependency 'Dynatrace', '~> 8.337.1.1003'
114
+ s.dependency 'Dynatrace', '~> 8.339.1.1011'
115
115
 
116
116
  # Allows for better compatibility for older and newer versions
117
117
  if defined?(install_modules_dependencies)
package/scripts/Config.js CHANGED
@@ -36,7 +36,7 @@ exports.defaultConfig = {
36
36
  navigation: {
37
37
  enabled: true,
38
38
  },
39
- userInteraction: false,
39
+ userInteraction: true,
40
40
  sourcemap: {
41
41
  enabled: true,
42
42
  androidSourcemapLocation: 'app/build/generated/sourcemaps/react/release/index.android.bundle.map',