@datadog/mobile-react-native-navigation 2.4.1 → 2.4.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 (147) hide show
  1. package/lib/commonjs/index.js +0 -1
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/rum/instrumentation/DdRumReactNativeNavigationTracking.js +40 -51
  4. package/lib/commonjs/rum/instrumentation/DdRumReactNativeNavigationTracking.js.map +1 -1
  5. package/lib/module/index.js +1 -0
  6. package/lib/module/index.js.map +1 -1
  7. package/lib/module/rum/instrumentation/DdRumReactNativeNavigationTracking.js +37 -46
  8. package/lib/module/rum/instrumentation/DdRumReactNativeNavigationTracking.js.map +1 -1
  9. package/lib/typescript/core/src/DdSdkReactNative.d.ts +1 -0
  10. package/lib/typescript/core/src/DdSdkReactNative.d.ts.map +1 -0
  11. package/lib/typescript/core/src/DdSdkReactNativeConfiguration.d.ts +1 -0
  12. package/lib/typescript/core/src/DdSdkReactNativeConfiguration.d.ts.map +1 -0
  13. package/lib/typescript/core/src/InternalLog.d.ts +1 -0
  14. package/lib/typescript/core/src/InternalLog.d.ts.map +1 -0
  15. package/lib/typescript/core/src/ProxyConfiguration.d.ts +1 -0
  16. package/lib/typescript/core/src/ProxyConfiguration.d.ts.map +1 -0
  17. package/lib/typescript/core/src/SdkVerbosity.d.ts +1 -0
  18. package/lib/typescript/core/src/SdkVerbosity.d.ts.map +1 -0
  19. package/lib/typescript/core/src/TrackingConsent.d.ts +1 -0
  20. package/lib/typescript/core/src/TrackingConsent.d.ts.map +1 -0
  21. package/lib/typescript/core/src/index.d.ts +1 -0
  22. package/lib/typescript/core/src/index.d.ts.map +1 -0
  23. package/lib/typescript/core/src/logs/DdLogs.d.ts +1 -0
  24. package/lib/typescript/core/src/logs/DdLogs.d.ts.map +1 -0
  25. package/lib/typescript/core/src/logs/eventMapper.d.ts +1 -0
  26. package/lib/typescript/core/src/logs/eventMapper.d.ts.map +1 -0
  27. package/lib/typescript/core/src/logs/types.d.ts +6 -1
  28. package/lib/typescript/core/src/logs/types.d.ts.map +1 -0
  29. package/lib/typescript/core/src/nativeModulesTypes.d.ts +3 -1
  30. package/lib/typescript/core/src/nativeModulesTypes.d.ts.map +1 -0
  31. package/lib/typescript/core/src/rum/DdAttributes.d.ts +14 -0
  32. package/lib/typescript/core/src/rum/DdAttributes.d.ts.map +1 -0
  33. package/lib/typescript/core/src/rum/DdRum.d.ts +3 -2
  34. package/lib/typescript/core/src/rum/DdRum.d.ts.map +1 -0
  35. package/lib/typescript/core/src/rum/eventMappers/actionEventMapper.d.ts +1 -0
  36. package/lib/typescript/core/src/rum/eventMappers/actionEventMapper.d.ts.map +1 -0
  37. package/lib/typescript/core/src/rum/eventMappers/errorEventMapper.d.ts +3 -0
  38. package/lib/typescript/core/src/rum/eventMappers/errorEventMapper.d.ts.map +1 -0
  39. package/lib/typescript/core/src/rum/eventMappers/resourceEventMapper.d.ts +1 -0
  40. package/lib/typescript/core/src/rum/eventMappers/resourceEventMapper.d.ts.map +1 -0
  41. package/lib/typescript/core/src/rum/instrumentation/DdRumErrorTracking.d.ts +1 -0
  42. package/lib/typescript/core/src/rum/instrumentation/DdRumErrorTracking.d.ts.map +1 -0
  43. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +1 -0
  44. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts.map +1 -0
  45. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +2 -0
  46. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts.map +1 -0
  47. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts +1 -0
  48. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/EventsInterceptor.d.ts.map +1 -0
  49. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts +1 -0
  50. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/NoOpEventsInterceptor.d.ts.map +1 -0
  51. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts +1 -0
  52. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/ShallowObjectEqualityChecker.d.ts.map +1 -0
  53. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts +2 -1
  54. package/lib/typescript/core/src/rum/instrumentation/interactionTracking/getJsxRuntime.d.ts.map +1 -0
  55. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts +1 -0
  56. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/DdRumResourceTracking.d.ts.map +1 -0
  57. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +1 -0
  58. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts.map +1 -0
  59. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +1 -0
  60. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts.map +1 -0
  61. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +1 -0
  62. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts.map +1 -0
  63. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +1 -0
  64. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts.map +1 -0
  65. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts +1 -0
  66. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/graphql/graphqlHeaders.d.ts.map +1 -0
  67. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +1 -0
  68. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts.map +1 -0
  69. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts +1 -0
  70. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/internalDevResourceBlocklist.d.ts.map +1 -0
  71. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts +1 -0
  72. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/resourceTiming.d.ts.map +1 -0
  73. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts +1 -0
  74. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/URLHostParser.d.ts.map +1 -0
  75. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts +1 -0
  76. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/XHRProxy.d.ts.map +1 -0
  77. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts +1 -0
  78. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/responseSize.d.ts.map +1 -0
  79. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +1 -0
  80. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts.map +1 -0
  81. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -0
  82. package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts.map +1 -0
  83. package/lib/typescript/core/src/rum/types.d.ts +1 -0
  84. package/lib/typescript/core/src/rum/types.d.ts.map +1 -0
  85. package/lib/typescript/core/src/sdk/AttributesSingleton/AttributesSingleton.d.ts +1 -0
  86. package/lib/typescript/core/src/sdk/AttributesSingleton/AttributesSingleton.d.ts.map +1 -0
  87. package/lib/typescript/core/src/sdk/AttributesSingleton/types.d.ts +1 -0
  88. package/lib/typescript/core/src/sdk/AttributesSingleton/types.d.ts.map +1 -0
  89. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts +1 -0
  90. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts.map +1 -0
  91. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts +1 -0
  92. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BufferSingleton.d.ts.map +1 -0
  93. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts +1 -0
  94. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/DatadogBuffer.d.ts.map +1 -0
  95. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts +1 -0
  96. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/PassThroughBuffer.d.ts.map +1 -0
  97. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts +1 -0
  98. package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/bufferNativeCall.d.ts.map +1 -0
  99. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProvider.d.ts +1 -0
  100. package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProvider.d.ts.map +1 -0
  101. package/lib/typescript/core/src/sdk/DdSdk.d.ts +1 -0
  102. package/lib/typescript/core/src/sdk/DdSdk.d.ts.map +1 -0
  103. package/lib/typescript/core/src/sdk/EventMappers/EventMapper.d.ts +1 -0
  104. package/lib/typescript/core/src/sdk/EventMappers/EventMapper.d.ts.map +1 -0
  105. package/lib/typescript/core/src/sdk/EventMappers/utils/deepClone.d.ts +1 -0
  106. package/lib/typescript/core/src/sdk/EventMappers/utils/deepClone.d.ts.map +1 -0
  107. package/lib/typescript/core/src/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts +1 -0
  108. package/lib/typescript/core/src/sdk/FileBasedConfiguration/FileBasedConfiguration.d.ts.map +1 -0
  109. package/lib/typescript/core/src/sdk/GlobalState/GlobalState.d.ts +1 -0
  110. package/lib/typescript/core/src/sdk/GlobalState/GlobalState.d.ts.map +1 -0
  111. package/lib/typescript/core/src/sdk/UserInfoSingleton/UserInfoSingleton.d.ts +1 -0
  112. package/lib/typescript/core/src/sdk/UserInfoSingleton/UserInfoSingleton.d.ts.map +1 -0
  113. package/lib/typescript/core/src/sdk/UserInfoSingleton/types.d.ts +1 -0
  114. package/lib/typescript/core/src/sdk/UserInfoSingleton/types.d.ts.map +1 -0
  115. package/lib/typescript/core/src/specs/NativeDdLogs.d.ts +1 -0
  116. package/lib/typescript/core/src/specs/NativeDdLogs.d.ts.map +1 -0
  117. package/lib/typescript/core/src/specs/NativeDdRum.d.ts +3 -1
  118. package/lib/typescript/core/src/specs/NativeDdRum.d.ts.map +1 -0
  119. package/lib/typescript/core/src/specs/NativeDdSdk.d.ts +1 -0
  120. package/lib/typescript/core/src/specs/NativeDdSdk.d.ts.map +1 -0
  121. package/lib/typescript/core/src/specs/NativeDdTrace.d.ts +1 -0
  122. package/lib/typescript/core/src/specs/NativeDdTrace.d.ts.map +1 -0
  123. package/lib/typescript/core/src/trace/DdTrace.d.ts +1 -0
  124. package/lib/typescript/core/src/trace/DdTrace.d.ts.map +1 -0
  125. package/lib/typescript/core/src/types.d.ts +1 -0
  126. package/lib/typescript/core/src/types.d.ts.map +1 -0
  127. package/lib/typescript/core/src/utils/Timer.d.ts +1 -0
  128. package/lib/typescript/core/src/utils/Timer.d.ts.map +1 -0
  129. package/lib/typescript/core/src/utils/argsUtils.d.ts +1 -0
  130. package/lib/typescript/core/src/utils/argsUtils.d.ts.map +1 -0
  131. package/lib/typescript/core/src/utils/errorUtils.d.ts +1 -0
  132. package/lib/typescript/core/src/utils/errorUtils.d.ts.map +1 -0
  133. package/lib/typescript/core/src/utils/jsUtils.d.ts +1 -0
  134. package/lib/typescript/core/src/utils/jsUtils.d.ts.map +1 -0
  135. package/lib/typescript/core/src/utils/longTasksUtils.d.ts +1 -0
  136. package/lib/typescript/core/src/utils/longTasksUtils.d.ts.map +1 -0
  137. package/lib/typescript/core/src/utils/time-provider/DefaultTimeProvider.d.ts +1 -0
  138. package/lib/typescript/core/src/utils/time-provider/DefaultTimeProvider.d.ts.map +1 -0
  139. package/lib/typescript/core/src/utils/time-provider/TimeProvider.d.ts +1 -0
  140. package/lib/typescript/core/src/utils/time-provider/TimeProvider.d.ts.map +1 -0
  141. package/lib/typescript/core/src/version.d.ts +2 -1
  142. package/lib/typescript/core/src/version.d.ts.map +1 -0
  143. package/lib/typescript/react-native-navigation/src/index.d.ts +1 -0
  144. package/lib/typescript/react-native-navigation/src/index.d.ts.map +1 -0
  145. package/lib/typescript/react-native-navigation/src/rum/instrumentation/DdRumReactNativeNavigationTracking.d.ts +1 -0
  146. package/lib/typescript/react-native-navigation/src/rum/instrumentation/DdRumReactNativeNavigationTracking.d.ts.map +1 -0
  147. package/package.json +4 -4
@@ -9,6 +9,5 @@ Object.defineProperty(exports, "DdRumReactNativeNavigationTracking", {
9
9
  return _DdRumReactNativeNavigationTracking.DdRumReactNativeNavigationTracking;
10
10
  }
11
11
  });
12
-
13
12
  var _DdRumReactNativeNavigationTracking = require("./rum/instrumentation/DdRumReactNativeNavigationTracking");
14
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAOA","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport type { ViewNamePredicate } from './rum/instrumentation/DdRumReactNativeNavigationTracking';\nimport { DdRumReactNativeNavigationTracking } from './rum/instrumentation/DdRumReactNativeNavigationTracking';\n\nexport { DdRumReactNativeNavigationTracking };\n\nexport type { ViewNamePredicate };\n"]}
1
+ {"version":3,"names":["_DdRumReactNativeNavigationTracking","require"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;AAOA,IAAAA,mCAAA,GAAAC,OAAA","ignoreList":[]}
@@ -4,23 +4,35 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DdRumReactNativeNavigationTracking = void 0;
7
-
8
7
  var _mobileReactNative = require("@datadog/mobile-react-native");
9
-
10
8
  var _reactNativeNavigation = require("react-native-navigation");
11
-
12
9
  var _reactNative = require("react-native");
10
+ /*
11
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
12
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
13
+ * Copyright 2016-Present Datadog, Inc.
14
+ */
13
15
 
14
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ // AppStateStatus can have values:
17
+ // 'active' - The app is running in the foreground
18
+ // 'background' - The app is running in the background. The user is either in another app or on the home screen
19
+ // 'inactive' [iOS] - This is a transition state that currently never happens for typical React Native apps.
20
+ // 'unknown' [iOS] - Initial value until the current app state is determined
21
+ // 'extension' [iOS] - The app is running as an app extension
15
22
 
16
23
  /**
17
24
  * Provides RUM integration for the [React Native Navigation](https://wix.github.io/react-native-navigation) API.
18
25
  */
19
26
  class DdRumReactNativeNavigationTracking {
27
+ static isTracking = false;
28
+ static eventSubscription = undefined;
29
+ static lastView = 'tracking_not_started';
30
+
20
31
  /**
21
32
  * Starts tracking the Navigation and sends a RUM View event every time a root View component appear/disappear.
22
33
  */
23
- static startTracking( // eslint-disable-next-line func-names
34
+ static startTracking(
35
+ // eslint-disable-next-line func-names
24
36
  viewNamePredicate = function (_event, trackedName) {
25
37
  return trackedName;
26
38
  }) {
@@ -28,14 +40,11 @@ class DdRumReactNativeNavigationTracking {
28
40
  if (DdRumReactNativeNavigationTracking.isTracking) {
29
41
  return;
30
42
  }
31
-
32
43
  DdRumReactNativeNavigationTracking.eventSubscription = _reactNativeNavigation.Navigation.events().registerComponentDidAppearListener(event => {
33
44
  const predicate = DdRumReactNativeNavigationTracking.viewNamePredicate;
34
45
  const screenName = predicate(event, event.componentName);
35
-
36
46
  if (screenName !== null) {
37
47
  _mobileReactNative.DdRum.startView(event.componentId, screenName);
38
-
39
48
  DdRumReactNativeNavigationTracking.lastView = {
40
49
  key: event.componentId,
41
50
  name: screenName
@@ -46,22 +55,19 @@ class DdRumReactNativeNavigationTracking {
46
55
  DdRumReactNativeNavigationTracking.viewNamePredicate = viewNamePredicate;
47
56
  this.appStateSubscription = _reactNative.AppState.addEventListener('change', DdRumReactNativeNavigationTracking.appStateListener);
48
57
  }
58
+
49
59
  /**
50
60
  * Stops tracking Navigation.
51
61
  */
52
-
53
-
54
62
  static stopTracking() {
55
63
  if (!DdRumReactNativeNavigationTracking.isTracking) {
56
64
  return;
57
65
  }
58
-
59
66
  if (DdRumReactNativeNavigationTracking.eventSubscription) {
60
67
  DdRumReactNativeNavigationTracking.eventSubscription.remove();
61
- } // For versions of React Native below 0.65, addEventListener does not return a subscription.
68
+ }
69
+ // For versions of React Native below 0.65, addEventListener does not return a subscription.
62
70
  // We have to call AppState.removeEventListener instead.
63
-
64
-
65
71
  if (this.appStateSubscription) {
66
72
  this.appStateSubscription.remove();
67
73
  } else {
@@ -69,49 +75,32 @@ class DdRumReactNativeNavigationTracking {
69
75
  // @ts-ignore
70
76
  _reactNative.AppState.removeEventListener('change', DdRumReactNativeNavigationTracking.appStateListener);
71
77
  }
72
-
73
78
  DdRumReactNativeNavigationTracking.lastView = undefined;
74
- DdRumReactNativeNavigationTracking.isTracking = false; // eslint-disable-next-line func-names
79
+ DdRumReactNativeNavigationTracking.isTracking = false;
75
80
 
81
+ // eslint-disable-next-line func-names
76
82
  DdRumReactNativeNavigationTracking.viewNamePredicate = function (_event, trackedName) {
77
83
  return trackedName;
78
84
  };
79
85
  }
80
-
86
+ static appStateListener = appStateStatus => {
87
+ const lastView = DdRumReactNativeNavigationTracking.lastView;
88
+ if (lastView === undefined) {
89
+ _mobileReactNative.InternalLog.log(`We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`, _mobileReactNative.SdkVerbosity.ERROR);
90
+ return;
91
+ }
92
+ if (lastView === 'tracking_not_started') {
93
+ // Do nothing as no view has been tracked already
94
+ return;
95
+ }
96
+ if (appStateStatus === 'background') {
97
+ _mobileReactNative.DdRum.stopView(lastView.key);
98
+ } else if (appStateStatus === 'active' || appStateStatus === undefined) {
99
+ // case when app goes into foreground,
100
+ // in that case navigation listener won't be called
101
+ _mobileReactNative.DdRum.startView(lastView.key, lastView.name);
102
+ }
103
+ };
81
104
  }
82
-
83
105
  exports.DdRumReactNativeNavigationTracking = DdRumReactNativeNavigationTracking;
84
-
85
- _defineProperty(DdRumReactNativeNavigationTracking, "isTracking", false);
86
-
87
- _defineProperty(DdRumReactNativeNavigationTracking, "eventSubscription", undefined);
88
-
89
- _defineProperty(DdRumReactNativeNavigationTracking, "appStateSubscription", void 0);
90
-
91
- _defineProperty(DdRumReactNativeNavigationTracking, "viewNamePredicate", void 0);
92
-
93
- _defineProperty(DdRumReactNativeNavigationTracking, "lastView", 'tracking_not_started');
94
-
95
- _defineProperty(DdRumReactNativeNavigationTracking, "appStateListener", appStateStatus => {
96
- const lastView = DdRumReactNativeNavigationTracking.lastView;
97
-
98
- if (lastView === undefined) {
99
- _mobileReactNative.InternalLog.log(`We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`, _mobileReactNative.SdkVerbosity.ERROR);
100
-
101
- return;
102
- }
103
-
104
- if (lastView === 'tracking_not_started') {
105
- // Do nothing as no view has been tracked already
106
- return;
107
- }
108
-
109
- if (appStateStatus === 'background') {
110
- _mobileReactNative.DdRum.stopView(lastView.key);
111
- } else if (appStateStatus === 'active' || appStateStatus === undefined) {
112
- // case when app goes into foreground,
113
- // in that case navigation listener won't be called
114
- _mobileReactNative.DdRum.startView(lastView.key, lastView.name);
115
- }
116
- });
117
106
  //# sourceMappingURL=DdRumReactNativeNavigationTracking.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DdRumReactNativeNavigationTracking.tsx"],"names":["DdRumReactNativeNavigationTracking","startTracking","viewNamePredicate","_event","trackedName","isTracking","eventSubscription","Navigation","events","registerComponentDidAppearListener","event","predicate","screenName","componentName","DdRum","startView","componentId","lastView","key","name","appStateSubscription","AppState","addEventListener","appStateListener","stopTracking","remove","removeEventListener","undefined","appStateStatus","InternalLog","log","SdkVerbosity","ERROR","stopView"],"mappings":";;;;;;;AAMA;;AAEA;;AAMA;;;;AAeA;AACA;AACA;AACO,MAAMA,kCAAN,CAAyC;AAe5C;AACJ;AACA;AACwB,SAAbC,aAAa,EAChB;AACAC,EAAAA,iBAAoC,GAAG,UACnCC,MADmC,EAEnCC,WAFmC,EAGrC;AACE,WAAOA,WAAP;AACH,GAPe,EAQZ;AACJ;AACA,QAAIJ,kCAAkC,CAACK,UAAvC,EAAmD;AAC/C;AACH;;AAEDL,IAAAA,kCAAkC,CAACM,iBAAnC,GAAuDC,kCAAWC,MAAX,GAAoBC,kCAApB,CAClDC,KAAD,IAAoC;AAChC,YAAMC,SAAS,GACXX,kCAAkC,CAACE,iBADvC;AAEA,YAAMU,UAAU,GAAGD,SAAS,CAACD,KAAD,EAAQA,KAAK,CAACG,aAAd,CAA5B;;AACA,UAAID,UAAU,KAAK,IAAnB,EAAyB;AACrBE,iCAAMC,SAAN,CAAgBL,KAAK,CAACM,WAAtB,EAAmCJ,UAAnC;;AACAZ,QAAAA,kCAAkC,CAACiB,QAAnC,GAA8C;AAC1CC,UAAAA,GAAG,EAAER,KAAK,CAACM,WA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ACH;;AAED,MAAIf,QAAQ,KAAK,sBAAjB,EAAyC;AACrC;AACA;AACH;;AAED,MAAIW,cAAc,KAAK,YAAvB,EAAqC;AACjCd,6BAAMmB,QAAN,CAAehB,QAAQ,CAACC,GAAxB;AACH,GAFD,MAEO,IACHU,cAAc,KAAK,QAAnB,IACAA,cAAc,KAAKD,SAFhB,EAGL;AACE;AACA;AACAb,6BAAMC,SAAN,CAAgBE,QAAQ,CAACC,GAAzB,EAA8BD,QAAQ,CAACE,IAAvC;AACH;AACJ,C","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport { DdRum, InternalLog, SdkVerbosity } from '@datadog/mobile-react-native';\nimport type { ComponentDidAppearEvent } from 'react-native-navigation';\nimport { Navigation } from 'react-native-navigation';\nimport type {\n AppStateStatus,\n EmitterSubscription,\n NativeEventSubscription\n} from 'react-native';\nimport { AppState } from 'react-native';\n\nexport type ViewNamePredicate = (\n event: ComponentDidAppearEvent,\n trackedName: string\n) => string | null;\n\n// AppStateStatus can have values:\n// 'active' - The app is running in the foreground\n// 'background' - The app is running in the background. The user is either in another app or on the home screen\n// 'inactive' [iOS] - This is a transition state that currently never happens for typical React Native apps.\n// 'unknown' [iOS] - Initial value until the current app state is determined\n// 'extension' [iOS] - The app is running as an app extension\ndeclare type AppStateListener = (appStateStatus: AppStateStatus) => void | null;\n\n/**\n * Provides RUM integration for the [React Native Navigation](https://wix.github.io/react-native-navigation) API.\n */\nexport class DdRumReactNativeNavigationTracking {\n private static isTracking = false;\n private static eventSubscription:\n | EmitterSubscription\n | undefined = undefined;\n private static appStateSubscription?: NativeEventSubscription;\n\n private static viewNamePredicate: ViewNamePredicate;\n private static lastView?:\n | {\n key: string;\n name: string;\n }\n | 'tracking_not_started' = 'tracking_not_started';\n\n /**\n * Starts tracking the Navigation and sends a RUM View event every time a root View component appear/disappear.\n */\n static startTracking(\n // eslint-disable-next-line func-names\n viewNamePredicate: ViewNamePredicate = function (\n _event: ComponentDidAppearEvent,\n trackedName: string\n ) {\n return trackedName;\n }\n ): void {\n // extra safety to avoid wrapping more than 1 time this function\n if (DdRumReactNativeNavigationTracking.isTracking) {\n return;\n }\n\n DdRumReactNativeNavigationTracking.eventSubscription = Navigation.events().registerComponentDidAppearListener(\n (event: ComponentDidAppearEvent) => {\n const predicate =\n DdRumReactNativeNavigationTracking.viewNamePredicate;\n const screenName = predicate(event, event.componentName);\n if (screenName !== null) {\n DdRum.startView(event.componentId, screenName);\n DdRumReactNativeNavigationTracking.lastView = {\n key: event.componentId,\n name: screenName\n };\n }\n }\n );\n\n DdRumReactNativeNavigationTracking.isTracking = true;\n DdRumReactNativeNavigationTracking.viewNamePredicate = viewNamePredicate;\n this.appStateSubscription = AppState.addEventListener(\n 'change',\n DdRumReactNativeNavigationTracking.appStateListener\n );\n }\n\n /**\n * Stops tracking Navigation.\n */\n static stopTracking(): void {\n if (!DdRumReactNativeNavigationTracking.isTracking) {\n return;\n }\n if (DdRumReactNativeNavigationTracking.eventSubscription) {\n DdRumReactNativeNavigationTracking.eventSubscription.remove();\n }\n // For versions of React Native below 0.65, addEventListener does not return a subscription.\n // We have to call AppState.removeEventListener instead.\n if (this.appStateSubscription) {\n this.appStateSubscription.remove();\n } else {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n AppState.removeEventListener(\n 'change',\n DdRumReactNativeNavigationTracking.appStateListener\n );\n }\n\n DdRumReactNativeNavigationTracking.lastView = undefined;\n DdRumReactNativeNavigationTracking.isTracking = false;\n\n // eslint-disable-next-line func-names\n DdRumReactNativeNavigationTracking.viewNamePredicate = function (\n _event: ComponentDidAppearEvent,\n trackedName: string\n ) {\n return trackedName;\n };\n }\n\n private static appStateListener: AppStateListener = (\n appStateStatus: AppStateStatus\n ) => {\n const lastView = DdRumReactNativeNavigationTracking.lastView;\n if (lastView === undefined) {\n InternalLog.log(\n `We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`,\n SdkVerbosity.ERROR\n );\n return;\n }\n\n if (lastView === 'tracking_not_started') {\n // Do nothing as no view has been tracked already\n return;\n }\n\n if (appStateStatus === 'background') {\n DdRum.stopView(lastView.key);\n } else if (\n appStateStatus === 'active' ||\n appStateStatus === undefined\n ) {\n // case when app goes into foreground,\n // in that case navigation listener won't be called\n DdRum.startView(lastView.key, lastView.name);\n }\n };\n}\n"]}
1
+ {"version":3,"names":["_mobileReactNative","require","_reactNativeNavigation","_reactNative","DdRumReactNativeNavigationTracking","isTracking","eventSubscription","undefined","lastView","startTracking","viewNamePredicate","_event","trackedName","Navigation","events","registerComponentDidAppearListener","event","predicate","screenName","componentName","DdRum","startView","componentId","key","name","appStateSubscription","AppState","addEventListener","appStateListener","stopTracking","remove","removeEventListener","appStateStatus","InternalLog","log","SdkVerbosity","ERROR","stopView","exports"],"sourceRoot":"../../../../src","sources":["rum/instrumentation/DdRumReactNativeNavigationTracking.tsx"],"mappings":";;;;;;AAMA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAdA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACO,MAAMG,kCAAkC,CAAC;EAC5C,OAAeC,UAAU,GAAG,KAAK;EACjC,OAAeC,iBAAiB,GAEdC,SAAS;EAI3B,OAAeC,QAAQ,GAKQ,sBAAsB;;EAErD;AACJ;AACA;EACI,OAAOC,aAAaA;EAChB;EACAC,iBAAoC,GAAG,SAAAA,CACnCC,MAA+B,EAC/BC,WAAmB,EACrB;IACE,OAAOA,WAAW;EACtB,CAAC,EACG;IACJ;IACA,IAAIR,kCAAkC,CAACC,UAAU,EAAE;MAC/C;IACJ;IAEAD,kCAAkC,CAACE,iBAAiB,GAAGO,iCAAU,CAACC,MAAM,CAAC,CAAC,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GAC3BI,cAA8B,IAC7B;IACD,MAAMxB,QAAQ,GAAGJ,kCAAkC,CAACI,QAAQ;IAC5D,IAAIA,QAAQ,KAAKD,SAAS,EAAE;MACxB0B,8BAAW,CAACC,GAAG,CACX,4EAA4EF,cAAc,gDAAgD,EAC1IG,+BAAY,CAACC,KACjB,CAAC;MACD;IACJ;IAEA,IAAI5B,QAAQ,KAAK,sBAAsB,EAAE;MACrC;MACA;IACJ;IAEA,IAAIwB,cAAc,KAAK,YAAY,EAAE;MACjCZ,wBAAK,CAACiB,QAAQ,CAAC7B,QAAQ,CAACe,GAAG,CAAC;IAChC,CAAC,MAAM,IACHS,cAAc,KAAK,QAAQ,IAC3BA,cAAc,KAAKzB,SAAS,EAC9B;MACE;MACA;MACAa,wBAAK,CAACC,SAAS,CAACb,QAAQ,CAACe,GAAG,EAAEf,QAAQ,CAACgB,IAAI,CAAC;IAChD;EACJ,CAAC;AACL;AAACc,OAAA,CAAAlC,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
4
4
  * Copyright 2016-Present Datadog, Inc.
5
5
  */
6
+
6
7
  import { DdRumReactNativeNavigationTracking } from './rum/instrumentation/DdRumReactNativeNavigationTracking';
7
8
  export { DdRumReactNativeNavigationTracking };
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":["DdRumReactNativeNavigationTracking"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAGA,SAASA,kCAAT,QAAmD,0DAAnD;AAEA,SAASA,kCAAT","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport type { ViewNamePredicate } from './rum/instrumentation/DdRumReactNativeNavigationTracking';\nimport { DdRumReactNativeNavigationTracking } from './rum/instrumentation/DdRumReactNativeNavigationTracking';\n\nexport { DdRumReactNativeNavigationTracking };\n\nexport type { ViewNamePredicate };\n"]}
1
+ {"version":3,"names":["DdRumReactNativeNavigationTracking"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAGA,SAASA,kCAAkC,QAAQ,0DAA0D;AAE7G,SAASA,kCAAkC","ignoreList":[]}
@@ -1,22 +1,33 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
1
  /*
4
2
  * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
5
3
  * This product includes software developed at Datadog (https://www.datadoghq.com/).
6
4
  * Copyright 2016-Present Datadog, Inc.
7
5
  */
6
+
8
7
  import { DdRum, InternalLog, SdkVerbosity } from '@datadog/mobile-react-native';
9
8
  import { Navigation } from 'react-native-navigation';
10
9
  import { AppState } from 'react-native';
11
10
 
11
+ // AppStateStatus can have values:
12
+ // 'active' - The app is running in the foreground
13
+ // 'background' - The app is running in the background. The user is either in another app or on the home screen
14
+ // 'inactive' [iOS] - This is a transition state that currently never happens for typical React Native apps.
15
+ // 'unknown' [iOS] - Initial value until the current app state is determined
16
+ // 'extension' [iOS] - The app is running as an app extension
17
+
12
18
  /**
13
19
  * Provides RUM integration for the [React Native Navigation](https://wix.github.io/react-native-navigation) API.
14
20
  */
15
21
  export class DdRumReactNativeNavigationTracking {
22
+ static isTracking = false;
23
+ static eventSubscription = undefined;
24
+ static lastView = 'tracking_not_started';
25
+
16
26
  /**
17
27
  * Starts tracking the Navigation and sends a RUM View event every time a root View component appear/disappear.
18
28
  */
19
- static startTracking( // eslint-disable-next-line func-names
29
+ static startTracking(
30
+ // eslint-disable-next-line func-names
20
31
  viewNamePredicate = function (_event, trackedName) {
21
32
  return trackedName;
22
33
  }) {
@@ -24,11 +35,9 @@ export class DdRumReactNativeNavigationTracking {
24
35
  if (DdRumReactNativeNavigationTracking.isTracking) {
25
36
  return;
26
37
  }
27
-
28
38
  DdRumReactNativeNavigationTracking.eventSubscription = Navigation.events().registerComponentDidAppearListener(event => {
29
39
  const predicate = DdRumReactNativeNavigationTracking.viewNamePredicate;
30
40
  const screenName = predicate(event, event.componentName);
31
-
32
41
  if (screenName !== null) {
33
42
  DdRum.startView(event.componentId, screenName);
34
43
  DdRumReactNativeNavigationTracking.lastView = {
@@ -41,22 +50,19 @@ export class DdRumReactNativeNavigationTracking {
41
50
  DdRumReactNativeNavigationTracking.viewNamePredicate = viewNamePredicate;
42
51
  this.appStateSubscription = AppState.addEventListener('change', DdRumReactNativeNavigationTracking.appStateListener);
43
52
  }
53
+
44
54
  /**
45
55
  * Stops tracking Navigation.
46
56
  */
47
-
48
-
49
57
  static stopTracking() {
50
58
  if (!DdRumReactNativeNavigationTracking.isTracking) {
51
59
  return;
52
60
  }
53
-
54
61
  if (DdRumReactNativeNavigationTracking.eventSubscription) {
55
62
  DdRumReactNativeNavigationTracking.eventSubscription.remove();
56
- } // For versions of React Native below 0.65, addEventListener does not return a subscription.
63
+ }
64
+ // For versions of React Native below 0.65, addEventListener does not return a subscription.
57
65
  // We have to call AppState.removeEventListener instead.
58
-
59
-
60
66
  if (this.appStateSubscription) {
61
67
  this.appStateSubscription.remove();
62
68
  } else {
@@ -64,46 +70,31 @@ export class DdRumReactNativeNavigationTracking {
64
70
  // @ts-ignore
65
71
  AppState.removeEventListener('change', DdRumReactNativeNavigationTracking.appStateListener);
66
72
  }
67
-
68
73
  DdRumReactNativeNavigationTracking.lastView = undefined;
69
- DdRumReactNativeNavigationTracking.isTracking = false; // eslint-disable-next-line func-names
74
+ DdRumReactNativeNavigationTracking.isTracking = false;
70
75
 
76
+ // eslint-disable-next-line func-names
71
77
  DdRumReactNativeNavigationTracking.viewNamePredicate = function (_event, trackedName) {
72
78
  return trackedName;
73
79
  };
74
80
  }
75
-
81
+ static appStateListener = appStateStatus => {
82
+ const lastView = DdRumReactNativeNavigationTracking.lastView;
83
+ if (lastView === undefined) {
84
+ InternalLog.log(`We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`, SdkVerbosity.ERROR);
85
+ return;
86
+ }
87
+ if (lastView === 'tracking_not_started') {
88
+ // Do nothing as no view has been tracked already
89
+ return;
90
+ }
91
+ if (appStateStatus === 'background') {
92
+ DdRum.stopView(lastView.key);
93
+ } else if (appStateStatus === 'active' || appStateStatus === undefined) {
94
+ // case when app goes into foreground,
95
+ // in that case navigation listener won't be called
96
+ DdRum.startView(lastView.key, lastView.name);
97
+ }
98
+ };
76
99
  }
77
-
78
- _defineProperty(DdRumReactNativeNavigationTracking, "isTracking", false);
79
-
80
- _defineProperty(DdRumReactNativeNavigationTracking, "eventSubscription", undefined);
81
-
82
- _defineProperty(DdRumReactNativeNavigationTracking, "appStateSubscription", void 0);
83
-
84
- _defineProperty(DdRumReactNativeNavigationTracking, "viewNamePredicate", void 0);
85
-
86
- _defineProperty(DdRumReactNativeNavigationTracking, "lastView", 'tracking_not_started');
87
-
88
- _defineProperty(DdRumReactNativeNavigationTracking, "appStateListener", appStateStatus => {
89
- const lastView = DdRumReactNativeNavigationTracking.lastView;
90
-
91
- if (lastView === undefined) {
92
- InternalLog.log(`We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`, SdkVerbosity.ERROR);
93
- return;
94
- }
95
-
96
- if (lastView === 'tracking_not_started') {
97
- // Do nothing as no view has been tracked already
98
- return;
99
- }
100
-
101
- if (appStateStatus === 'background') {
102
- DdRum.stopView(lastView.key);
103
- } else if (appStateStatus === 'active' || appStateStatus === undefined) {
104
- // case when app goes into foreground,
105
- // in that case navigation listener won't be called
106
- DdRum.startView(lastView.key, lastView.name);
107
- }
108
- });
109
100
  //# sourceMappingURL=DdRumReactNativeNavigationTracking.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["DdRumReactNativeNavigationTracking.tsx"],"names":["DdRum","InternalLog","SdkVerbosity","Navigation","AppState","DdRumReactNativeNavigationTracking","startTracking","viewNamePredicate","_event","trackedName","isTracking","eventSubscription","events","registerComponentDidAppearListener","event","predicate","screenName","componentName","startView","componentId","lastView","key","name","appStateSubscription","addEventListener","appStateListener","stopTracking","remove","removeEventListener","undefined","appStateStatus","log","ERROR","stopView"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AAEA,SAASA,KAAT,EAAgBC,WAAhB,EAA6BC,YAA7B,QAAiD,8BAAjD;AAEA,SAASC,UAAT,QAA2B,yBAA3B;AAMA,SAASC,QAAT,QAAyB,cAAzB;;AAeA;AACA;AACA;AACA,OAAO,MAAMC,kCAAN,CAAyC;AAe5C;AACJ;AACA;AACwB,SAAbC,aAAa,EAChB;AACAC,EAAAA,iBAAoC,GAAG,UACnCC,MADmC,EAEnCC,WAFmC,EAGrC;AACE,WAAOA,WAAP;AACH,GAPe,EAQZ;AACJ;AACA,QAAIJ,kCAAkC,CAACK,UAAvC,EAAmD;AAC/C;AACH;;AAEDL,IAAAA,kCAAkC,CAACM,iBAAnC,GAAuDR,UAAU,CAACS,MAAX,GAAoBC,kCAApB,CAClDC,KAAD,IAAoC;AAChC,YAAMC,SAAS,GACXV,kCAAkC,CAACE,iBADvC;AAEA,YAAMS,UAAU,GAAGD,SAAS,CAACD,KAAD,EAAQA,KAAK,CAACG,aAAd,CAA5B;;AACA,UAAID,UAAU,KAAK,IAAnB,EAAyB;AACrBhB,QAAAA,KAAK,CAACkB,SAAN,CAAgBJ,KAAK,CAACK,WAAtB,EAAmCH,UAAnC;AACAX,QAAAA,kCAAkC,CAACe,QAAnC,GAA8C;AAC1CC,UAAAA,GAAG,EAAEP,KAAK,CAACK,WAD+B;AAE1CG,UAAAA,IAAI,EAAEN;AAFoC,SAA9C;AAIH;AACJ,KAZkD,CAAvD;AAeAX,IAAAA,kCAAkC,CAACK,UAAnC,GAAgD,IAAhD;AACAL,IAAAA,kCAAkC,CAACE,iBAAnC,GAAuDA,iBAAvD;AACA,SAAKgB,oBAAL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xB;AACH,GAFD,MAEO,IACHS,cAAc,KAAK,QAAnB,IACAA,cAAc,KAAKD,SAFhB,EAGL;AACE;AACA;AACA7B,IAAAA,KAAK,CAACkB,SAAN,CAAgBE,QAAQ,CAACC,GAAzB,EAA8BD,QAAQ,CAACE,IAAvC;AACH;AACJ,C","sourcesContent":["/*\n * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.\n * This product includes software developed at Datadog (https://www.datadoghq.com/).\n * Copyright 2016-Present Datadog, Inc.\n */\n\nimport { DdRum, InternalLog, SdkVerbosity } from '@datadog/mobile-react-native';\nimport type { ComponentDidAppearEvent } from 'react-native-navigation';\nimport { Navigation } from 'react-native-navigation';\nimport type {\n AppStateStatus,\n EmitterSubscription,\n NativeEventSubscription\n} from 'react-native';\nimport { AppState } from 'react-native';\n\nexport type ViewNamePredicate = (\n event: ComponentDidAppearEvent,\n trackedName: string\n) => string | null;\n\n// AppStateStatus can have values:\n// 'active' - The app is running in the foreground\n// 'background' - The app is running in the background. The user is either in another app or on the home screen\n// 'inactive' [iOS] - This is a transition state that currently never happens for typical React Native apps.\n// 'unknown' [iOS] - Initial value until the current app state is determined\n// 'extension' [iOS] - The app is running as an app extension\ndeclare type AppStateListener = (appStateStatus: AppStateStatus) => void | null;\n\n/**\n * Provides RUM integration for the [React Native Navigation](https://wix.github.io/react-native-navigation) API.\n */\nexport class DdRumReactNativeNavigationTracking {\n private static isTracking = false;\n private static eventSubscription:\n | EmitterSubscription\n | undefined = undefined;\n private static appStateSubscription?: NativeEventSubscription;\n\n private static viewNamePredicate: ViewNamePredicate;\n private static lastView?:\n | {\n key: string;\n name: string;\n }\n | 'tracking_not_started' = 'tracking_not_started';\n\n /**\n * Starts tracking the Navigation and sends a RUM View event every time a root View component appear/disappear.\n */\n static startTracking(\n // eslint-disable-next-line func-names\n viewNamePredicate: ViewNamePredicate = function (\n _event: ComponentDidAppearEvent,\n trackedName: string\n ) {\n return trackedName;\n }\n ): void {\n // extra safety to avoid wrapping more than 1 time this function\n if (DdRumReactNativeNavigationTracking.isTracking) {\n return;\n }\n\n DdRumReactNativeNavigationTracking.eventSubscription = Navigation.events().registerComponentDidAppearListener(\n (event: ComponentDidAppearEvent) => {\n const predicate =\n DdRumReactNativeNavigationTracking.viewNamePredicate;\n const screenName = predicate(event, event.componentName);\n if (screenName !== null) {\n DdRum.startView(event.componentId, screenName);\n DdRumReactNativeNavigationTracking.lastView = {\n key: event.componentId,\n name: screenName\n };\n }\n }\n );\n\n DdRumReactNativeNavigationTracking.isTracking = true;\n DdRumReactNativeNavigationTracking.viewNamePredicate = viewNamePredicate;\n this.appStateSubscription = AppState.addEventListener(\n 'change',\n DdRumReactNativeNavigationTracking.appStateListener\n );\n }\n\n /**\n * Stops tracking Navigation.\n */\n static stopTracking(): void {\n if (!DdRumReactNativeNavigationTracking.isTracking) {\n return;\n }\n if (DdRumReactNativeNavigationTracking.eventSubscription) {\n DdRumReactNativeNavigationTracking.eventSubscription.remove();\n }\n // For versions of React Native below 0.65, addEventListener does not return a subscription.\n // We have to call AppState.removeEventListener instead.\n if (this.appStateSubscription) {\n this.appStateSubscription.remove();\n } else {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n AppState.removeEventListener(\n 'change',\n DdRumReactNativeNavigationTracking.appStateListener\n );\n }\n\n DdRumReactNativeNavigationTracking.lastView = undefined;\n DdRumReactNativeNavigationTracking.isTracking = false;\n\n // eslint-disable-next-line func-names\n DdRumReactNativeNavigationTracking.viewNamePredicate = function (\n _event: ComponentDidAppearEvent,\n trackedName: string\n ) {\n return trackedName;\n };\n }\n\n private static appStateListener: AppStateListener = (\n appStateStatus: AppStateStatus\n ) => {\n const lastView = DdRumReactNativeNavigationTracking.lastView;\n if (lastView === undefined) {\n InternalLog.log(\n `We could not determine the route when changing the application state to: ${appStateStatus}. No RUM View event will be sent in this case.`,\n SdkVerbosity.ERROR\n );\n return;\n }\n\n if (lastView === 'tracking_not_started') {\n // Do nothing as no view has been tracked already\n return;\n }\n\n if (appStateStatus === 'background') {\n DdRum.stopView(lastView.key);\n } else if (\n appStateStatus === 'active' ||\n appStateStatus === undefined\n ) {\n // case when app goes into foreground,\n // in that case navigation listener won't be called\n DdRum.startView(lastView.key, lastView.name);\n }\n };\n}\n"]}
1
+ {"version":3,"names":["DdRum","InternalLog","SdkVerbosity","Navigation","AppState","DdRumReactNativeNavigationTracking","isTracking","eventSubscription","undefined","lastView","startTracking","viewNamePredicate","_event","trackedName","events","registerComponentDidAppearListener","event","predicate","screenName","componentName","startView","componentId","key","name","appStateSubscription","addEventListener","appStateListener","stopTracking","remove","removeEventListener","appStateStatus","log","ERROR","stopView"],"sourceRoot":"../../../../src","sources":["rum/instrumentation/DdRumReactNativeNavigationTracking.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAAQ,8BAA8B;AAE/E,SAASC,UAAU,QAAQ,yBAAyB;AAMpD,SAASC,QAAQ,QAAQ,cAAc;;AAOvC;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,CAAC;EAC5C,OAAeC,UAAU,GAAG,KAAK;EACjC,OAAeC,iBAAiB,GAEdC,SAAS;EAI3B,OAAeC,QAAQ,GAKQ,sBAAsB;;EAErD;AACJ;AACA;EACI,OAAOC,aAAaA;EAChB;EACAC,iBAAoC,GAAG,SAAAA,CACnCC,MAA+B,EAC/BC,WAAmB,EACrB;IACE,OAAOA,WAAW;EACtB,CAAC,EACG;IACJ;IACA,IAAIR,kCAAkC,CAACC,UAAU,EAAE;MAC/C;IACJ;IAEAD,kCAAkC,CAACE,iBAAiB,GAAGJ,UAAU,CAACW,MAAM,CAAC,CAAC,CAACC,kCAAkC,CACxGC,KAA8B,IAAK;MAChC,MAAMC,SAAS,GACXZ,kCAAkC,CAACM,iBAAiB;MACxD,MAAMO,UAAU,GAAGD,SAAS,CAACD,KAAK,EAAEA,KAAK,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,CACX,4EAA4ED,cAAc,gDAAgD,EAC1I5B,YAAY,CAAC8B,KACjB,CAAC;MACD;IACJ;IAEA,IAAIvB,QAAQ,KAAK,sBAAsB,EAAE;MACrC;MACA;IACJ;IAEA,IAAIqB,cAAc,KAAK,YAAY,EAAE;MACjC9B,KAAK,CAACiC,QAAQ,CAACxB,QAAQ,CAACa,GAAG,CAAC;IAChC,CAAC,MAAM,IACHQ,cAAc,KAAK,QAAQ,IAC3BA,cAAc,KAAKtB,SAAS,EAC9B;MACE;MACA;MACAR,KAAK,CAACoB,SAAS,CAACX,QAAQ,CAACa,GAAG,EAAEb,QAAQ,CAACc,IAAI,CAAC;IAChD;EACJ,CAAC;AACL","ignoreList":[]}
@@ -59,3 +59,4 @@ export declare class DdSdkReactNative {
59
59
  private static buildConfiguration;
60
60
  private static enableFeatures;
61
61
  }
62
+ //# sourceMappingURL=DdSdkReactNative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdSdkReactNative.d.ts","sourceRoot":"","sources":["../../../../../core/src/DdSdkReactNative.tsx"],"names":[],"mappings":"AAQA,OAAO,EACH,6BAA6B,EAKhC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAER,4BAA4B,EAC5B,kCAAkC,EAClC,gCAAgC,EAEnC,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAMlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAK9D;;GAEG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAgB;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAqB;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAiB;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAwB;IAEjE,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAS;IAC3C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAmC;IAE3D;;;;OAIG;IACH,MAAM,CAAC,UAAU,kBACE,6BAA6B,KAC7C,QAAQ,IAAI,CAAC,CAKd;IAEF,OAAO,CAAC,MAAM,CAAC,mBAAmB,CA2BhC;IAEF;;OAEG;WACU,8BAA8B,CACvC,aAAa,EAAE,4BAA4B,GAC5C,OAAO,CAAC,IAAI,CAAC;IA2BhB;;OAEG;WACU,kCAAkC,CAC3C,QAAQ,EAAE,gCAAgC,GAC3C,OAAO,CAAC,IAAI,CAAC;IAOhB;;OAEG;IACH,MAAM,CAAC,oDAAoD,kBACxC,kCAAkC,KAClD,QAAQ,IAAI,CAAC,CAgBd;IAEF;;;;;OAKG;IAEH,MAAM,CAAC,aAAa,eAAsB,UAAU,KAAG,QAAQ,IAAI,CAAC,CAOlE;IAEF;;;;OAIG;IAEH,MAAM,CAAC,OAAO,SAAgB,QAAQ,KAAG,QAAQ,IAAI,CAAC,CAOpD;IAEF;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,YAAa,eAAe,KAAG,QAAQ,IAAI,CAAC,CAGnE;IAEF;;;OAGG;IACH,MAAM,CAAC,YAAY,QAAO,QAAQ,IAAI,CAAC,CAGrC;IAEF,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAqE/B;IAEF,OAAO,CAAC,MAAM,CAAC,cAAc;CAmDhC"}
@@ -318,3 +318,4 @@ export declare enum InitializationMode {
318
318
  ASYNC = "ASYNC"
319
319
  }
320
320
  export type InitializationModeForTelemetry = 'LEGACY' | 'SYNC' | 'ASYNC' | 'PARTIAL' | 'FILE';
321
+ //# sourceMappingURL=DdSdkReactNativeConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdSdkReactNativeConfiguration.d.ts","sourceRoot":"","sources":["../../../../../core/src/DdSdkReactNativeConfiguration.t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AkB,EAAE,kBAAkB,CAA2B;CAC3E;AAED,oBAAY,kBAAkB;IAC1B,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAED,MAAM,MAAM,8BAA8B,GACpC,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,CAAC"}
@@ -10,3 +10,4 @@ export declare class InternalLog {
10
10
  static verbosity: SdkVerbosity | undefined;
11
11
  static log(message: string, verbosity: SdkVerbosity): void;
12
12
  }
13
+ //# sourceMappingURL=InternalLog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalLog.d.ts","sourceRoot":"","sources":["../../../../../core/src/InternalLog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,WAAW;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAKpB;IAEH,OAAc,SAAS,EAAE,YAAY,GAAG,SAAS,CAAa;WAEhD,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,IAAI;CA0BpE"}
@@ -46,3 +46,4 @@ declare enum ProxyType {
46
46
  SOCKS = "socks"
47
47
  }
48
48
  export { ProxyConfiguration, ProxyType };
49
+ //# sourceMappingURL=ProxyConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProxyConfiguration.d.ts","sourceRoot":"","sources":["../../../../../core/src/ProxyConfiguration.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAM,kBAAkB;IAKhB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM;IAfzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;;IAGd;;OAEG;IACM,IAAI,EAAE,SAAS;IACxB;;OAEG;IACM,OAAO,EAAE,MAAM;IACxB;;OAEG;IACM,IAAI,EAAE,MAAM;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM;CAaxB;AAED,aAAK,SAAS;IACV,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;CAClB;AAED,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC"}
@@ -7,3 +7,4 @@ export declare enum SdkVerbosity {
7
7
  WARN = "warn",
8
8
  ERROR = "error"
9
9
  }
10
+ //# sourceMappingURL=SdkVerbosity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SdkVerbosity.d.ts","sourceRoot":"","sources":["../../../../../core/src/SdkVerbosity.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,oBAAY,YAAY;IACpB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAClB"}
@@ -6,3 +6,4 @@ export declare enum TrackingConsent {
6
6
  GRANTED = "granted",
7
7
  NOT_GRANTED = "not_granted"
8
8
  }
9
+ //# sourceMappingURL=TrackingConsent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrackingConsent.d.ts","sourceRoot":"","sources":["../../../../../core/src/TrackingConsent.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,oBAAY,eAAe;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC9B"}
@@ -17,3 +17,4 @@ import { TimeProvider } from './utils/time-provider/TimeProvider';
17
17
  import type { Timestamp } from './utils/time-provider/TimeProvider';
18
18
  export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdTrace, DdRum, RumActionType, ErrorSource, DdSdkReactNativeConfiguration, DdSdkReactNative, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER };
19
19
  export type { Timestamp };
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,aAAa,CAAC;AACrB,OAAO,EACH,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,SAAS,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EACH,sCAAsC,EACtC,sCAAsC,EACtC,iCAAiC,EACpC,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAIpE,OAAO,EACH,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAW,EACX,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,sCAAsC,EACtC,sCAAsC,EACtC,iCAAiC,EACpC,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -20,3 +20,4 @@ declare class DdLogsWrapper implements DdLogsType {
20
20
  }
21
21
  export declare const DdLogs: DdLogsWrapper;
22
22
  export {};
23
+ //# sourceMappingURL=DdLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdLogs.d.ts","sourceRoot":"","sources":["../../../../../../core/src/logs/DdLogs.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACR,UAAU,EACV,YAAY,EACZ,cAAc,EACd,qBAAqB,EAExB,MAAM,SAAS,CAAC;AAsBjB,cAAM,aAAc,YAAW,UAAU;IAErC,OAAO,CAAC,UAAU,CACL;IACb,OAAO,CAAC,cAAc,CAAkC;IAExD,KAAK,YAAa,YAAY,GAAG,qBAAqB,KAAG,QAAQ,IAAI,CAAC,CAapE;IAEF,IAAI,YAAa,YAAY,GAAG,qBAAqB,KAAG,QAAQ,IAAI,CAAC,CAanE;IAEF,IAAI,YAAa,YAAY,GAAG,qBAAqB,KAAG,QAAQ,IAAI,CAAC,CAanE;IAEF,KAAK,YAAa,YAAY,GAAG,qBAAqB,KAAG,QAAQ,IAAI,CAAC,CAapE;IAEF;;;OAGG;IACH,OAAO,CAAC,gCAAgC,CAStC;IAEF,OAAO,CAAC,uBAAuB,CAQ7B;IAEF,OAAO,CAAC,eAAe,CAQrB;IAEF,OAAO,CAAC,GAAG,CA4BT;IAEF,OAAO,CAAC,YAAY,CAmDlB;IAEF,sBAAsB,CAAC,cAAc,EAAE,cAAc;IAIrD,wBAAwB;CAG3B;AAED,eAAO,MAAM,MAAM,eAAsB,CAAC"}
@@ -9,3 +9,4 @@ export declare const formatRawLogToLogEvent: (rawLog: RawLog | RawLogWithError,
9
9
  attributes: Attributes;
10
10
  }) => LogEvent;
11
11
  export declare const generateEventMapper: (logEventMapper: LogEventMapper | undefined) => EventMapper<RawLog | RawLogWithError, LogEvent, NativeLog | NativeLogWithError>;
12
+ //# sourceMappingURL=eventMapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventMapper.d.ts","sourceRoot":"","sources":["../../../../../../core/src/logs/eventMapper.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,KAAK,EACR,QAAQ,EACR,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,MAAM,EACN,eAAe,EAClB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,yBAAyB,aACxB,QAAQ,KACnB,SAAS,GAAG,kBAEd,CAAC;AAEF,eAAO,MAAM,yBAAyB,WAC1B,MAAM,GAAG,eAAe,KACjC,SAAS,GAAG,kBAEd,CAAC;AAEF,eAAO,MAAM,sBAAsB,WACvB,MAAM,GAAG,eAAe,yBACT;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CAC1B,KACF,QAMF,CAAC;AAEF,eAAO,MAAM,mBAAmB,mBACZ,cAAc,GAAG,SAAS,oFAOzC,CAAC"}
@@ -43,6 +43,7 @@ export type RawLogWithError = {
43
43
  stacktrace: string;
44
44
  context: object;
45
45
  status: LogStatus;
46
+ fingerprint?: string;
46
47
  };
47
48
  /**
48
49
  * Log input for native SDKs
@@ -57,6 +58,7 @@ export type NativeLogWithError = {
57
58
  errorMessage: string;
58
59
  stacktrace: string;
59
60
  context: object;
61
+ fingerprint?: string;
60
62
  };
61
63
  export type LogStatus = 'debug' | 'info' | 'warn' | 'error';
62
64
  export type LogEvent = {
@@ -65,6 +67,7 @@ export type LogEvent = {
65
67
  errorKind?: string;
66
68
  errorMessage?: string;
67
69
  stacktrace?: string;
70
+ fingerprint?: string;
68
71
  readonly status: LogStatus;
69
72
  readonly userInfo: UserInfo;
70
73
  readonly attributes?: object;
@@ -76,5 +79,7 @@ export type LogWithErrorArguments = [
76
79
  errorKind?: string,
77
80
  errorMessage?: string,
78
81
  stacktrace?: string,
79
- context?: object
82
+ context?: object,
83
+ fingerprint?: string
80
84
  ];
85
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../core/src/logs/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB;;;;OAIG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,YAAY,GAAG,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpE;;;;OAIG;IACH,IAAI,CAAC,GAAG,IAAI,EAAE,YAAY,GAAG,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;OAIG;IACH,IAAI,CAAC,GAAG,IAAI,EAAE,YAAY,GAAG,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;;OAIG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,YAAY,GAAG,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,MAAM,G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Q,KAAK,QAAQ,GAAG,IAAI,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG;IAChC,OAAO,EAAE,MAAM;IACf,SAAS,CAAC,EAAE,MAAM;IAClB,YAAY,CAAC,EAAE,MAAM;IACrB,UAAU,CAAC,EAAE,MAAM;IACnB,OAAO,CAAC,EAAE,MAAM;IAChB,WAAW,CAAC,EAAE,MAAM;CACvB,CAAC"}
@@ -86,7 +86,9 @@ export interface DdNativeRumType extends NativeDdRum {
86
86
  * @param stacktrace: The error stacktrace.
87
87
  * @param context: The additional context to send.
88
88
  * @param timestampMs: The timestamp when the error occurred (in milliseconds). If not provided, current timestamp will be used.
89
+ * @param fingerprint: Optional custom error fingerprint.
89
90
  */
90
- addError(message: string, source: ErrorSource, stacktrace: string, context: object, timestampMs: number): Promise<void>;
91
+ addError(message: string, source: ErrorSource, stacktrace: string, context: object, timestampMs: number, fingerprint: string | undefined): Promise<void>;
91
92
  }
92
93
  export {};
94
+ //# sourceMappingURL=nativeModulesTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nativeModulesTypes.d.ts","sourceRoot":"","sources":["../../../../../core/src/nativeModulesTypes.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;GAGG;AAEH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAA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CAAC;IAEjB;;;;;;OAMG;IACH,UAAU,CACN,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;OAMG;IACH,SAAS,CACL,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;;OAQG;IACH,YAAY,CACR,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAAG,SAAS,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -0,0 +1,14 @@
1
+ export declare const DdAttributes: {
2
+ /**
3
+ * Custom "source type" of the error. Used in RUM errors. It names the
4
+ * language or platform of the RUM error stack trace, so the SCI backend
5
+ * knows how to symbolize it. Expects {@link String} value.
6
+ */
7
+ errorSourceType: string;
8
+ /**
9
+ * Custom fingerprint to an error.
10
+ * Expects {@link String} value.
11
+ */
12
+ errorFingerprint: string;
13
+ };
14
+ //# sourceMappingURL=DdAttributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdAttributes.d.ts","sourceRoot":"","sources":["../../../../../../core/src/rum/DdAttributes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY;IACrB;;;;OAIG;;IAGH;;;OAGG;;CAEN,CAAC"}
@@ -3,7 +3,7 @@ import type { TimeProvider } from '../utils/time-provider/TimeProvider';
3
3
  import type { ActionEventMapper } from './eventMappers/actionEventMapper';
4
4
  import type { ErrorEventMapper } from './eventMappers/errorEventMapper';
5
5
  import type { ResourceEventMapper } from './eventMappers/resourceEventMapper';
6
- import type { DdRumType, RumActionType, ResourceKind, ErrorSource } from './types';
6
+ import type { ErrorSource, DdRumType, RumActionType, ResourceKind } from './types';
7
7
  declare class DdRumWrapper implements DdRumType {
8
8
  private nativeRum;
9
9
  private lastActionData?;
@@ -24,7 +24,7 @@ declare class DdRumWrapper implements DdRumType {
24
24
  addAction: (type: RumActionType, name: string, context?: object, timestampMs?: number, actionContext?: GestureResponderEvent) => Promise<void>;
25
25
  startResource: (key: string, method: string, url: string, context?: object, timestampMs?: number) => Promise<void>;
26
26
  stopResource: (key: string, statusCode: number, kind: ResourceKind, size?: number, context?: object, timestampMs?: number, resourceContext?: XMLHttpRequest) => Promise<void>;
27
- addError: (message: string, source: ErrorSource, stacktrace: string, context?: object, timestampMs?: number) => Promise<void>;
27
+ addError: (message: string, source: ErrorSource, stacktrace: string, context?: object, timestampMs?: number, fingerprint?: string) => Promise<void>;
28
28
  addTiming: (name: string) => Promise<void>;
29
29
  stopSession: () => Promise<void>;
30
30
  addFeatureFlagEvaluation: (name: string, value: unknown) => Promise<void>;
@@ -40,3 +40,4 @@ declare class DdRumWrapper implements DdRumType {
40
40
  }
41
41
  export declare const DdRum: DdRumWrapper;
42
42
  export {};
43
+ //# sourceMappingURL=DdRum.d.ts.map