@datadog/mobile-react-native 2.3.1 → 2.3.3

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 (42) hide show
  1. package/DatadogSDKReactNative.podspec +1 -0
  2. package/android/build.gradle +2 -0
  3. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkBridgeExt.kt +188 -20
  4. package/android/src/main/kotlin/com/datadog/reactnative/DdSdkConfigurationExt.kt +30 -13
  5. package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
  6. package/android/src/newarch/kotlin/com/datadog/reactnative/DdLogs.kt +3 -2
  7. package/android/src/newarch/kotlin/com/datadog/reactnative/DdRum.kt +28 -13
  8. package/android/src/newarch/kotlin/com/datadog/reactnative/DdSdk.kt +3 -2
  9. package/android/src/newarch/kotlin/com/datadog/reactnative/DdTrace.kt +4 -2
  10. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdLogs.kt +1 -1
  11. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdRum.kt +3 -2
  12. package/android/src/oldarch/kotlin/com/datadog/reactnative/DdTrace.kt +4 -2
  13. package/android/src/test/kotlin/com/datadog/reactnative/DdSdkBridgeExtTest.kt +382 -0
  14. package/android/src/test/kotlin/com/datadog/tools/unit/MapExt.kt +9 -0
  15. package/ios/Sources/JSRefreshRateListener.swift +1 -0
  16. package/ios/Sources/SdkVersion.swift +1 -1
  17. package/lib/commonjs/version.js +1 -1
  18. package/lib/commonjs/version.js.map +1 -1
  19. package/lib/module/version.js +1 -1
  20. package/lib/module/version.js.map +1 -1
  21. package/lib/typescript/DdSdkReactNativeConfiguration.d.ts +7 -7
  22. package/lib/typescript/logs/types.d.ts +10 -10
  23. package/lib/typescript/nativeModulesTypes.d.ts +5 -5
  24. package/lib/typescript/rum/eventMappers/actionEventMapper.d.ts +4 -4
  25. package/lib/typescript/rum/eventMappers/errorEventMapper.d.ts +4 -4
  26. package/lib/typescript/rum/eventMappers/resourceEventMapper.d.ts +4 -4
  27. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +3 -3
  28. package/lib/typescript/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +1 -1
  29. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +1 -1
  30. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +1 -1
  31. package/lib/typescript/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
  32. package/lib/typescript/rum/types.d.ts +3 -3
  33. package/lib/typescript/sdk/AttributesSingleton/types.d.ts +1 -1
  34. package/lib/typescript/sdk/DatadogProvider/DatadogProvider.d.ts +2 -2
  35. package/lib/typescript/sdk/EventMappers/EventMapper.d.ts +1 -1
  36. package/lib/typescript/sdk/UserInfoSingleton/types.d.ts +1 -1
  37. package/lib/typescript/types.d.ts +2 -2
  38. package/lib/typescript/utils/TimeProvider.d.ts +1 -1
  39. package/lib/typescript/version.d.ts +1 -1
  40. package/package.json +2 -2
  41. package/src/sdk/DatadogProvider/__tests__/initialization.test.tsx +1 -1
  42. package/src/version.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  import type { FirstPartyHost, PropagatorType } from '../../../types';
2
2
  import type { RegexMap } from '../requestProxy/interfaces/RequestProxy';
3
- export declare type Hostname = {
3
+ export type Hostname = {
4
4
  _type: 'Hostname';
5
5
  } & string;
6
6
  export declare const NO_MATCH_REGEX: RegExp;
@@ -1,5 +1,5 @@
1
1
  import type { RUMResource } from '../../interfaces/RumResource';
2
- declare type ResourceMapper = (resource: RUMResource) => RUMResource | null;
2
+ type ResourceMapper = (resource: RUMResource) => RUMResource | null;
3
3
  export declare class ResourceReporter {
4
4
  private mappers;
5
5
  constructor(resourceMappers: ResourceMapper[]);
@@ -3,7 +3,7 @@ export interface RequestProxyOptions {
3
3
  tracingSamplingRate: number;
4
4
  firstPartyHostsRegexMap: RegexMap;
5
5
  }
6
- export declare type RegexMap = {
6
+ export type RegexMap = {
7
7
  regex: RegExp;
8
8
  propagatorType: PropagatorType;
9
9
  }[];
@@ -20,7 +20,7 @@ export interface RUMResource {
20
20
  };
21
21
  resourceContext?: XMLHttpRequest;
22
22
  }
23
- export declare type DdRumResourceGraphqlAttributes = {
23
+ export type DdRumResourceGraphqlAttributes = {
24
24
  operationType?: string;
25
25
  operationName?: string;
26
26
  variables?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The entry point to use Datadog's RUM feature.
3
3
  */
4
- export declare type DdRumType = {
4
+ export type DdRumType = {
5
5
  /**
6
6
  * Start tracking a RUM View.
7
7
  * @param key: The view unique key identifier.
@@ -104,7 +104,7 @@ export declare enum RumActionType {
104
104
  /** A custom action. */
105
105
  CUSTOM = "CUSTOM"
106
106
  }
107
- export declare type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
107
+ export type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
108
108
  export declare enum ErrorSource {
109
109
  NETWORK = "NETWORK",
110
110
  SOURCE = "SOURCE",
@@ -125,7 +125,7 @@ export declare enum PropagatorType {
125
125
  B3 = "b3",
126
126
  B3MULTI = "b3multi"
127
127
  }
128
- export declare type FirstPartyHost = {
128
+ export type FirstPartyHost = {
129
129
  match: string;
130
130
  propagatorTypes: PropagatorType[];
131
131
  };
@@ -1,3 +1,3 @@
1
- export declare type Attributes = {
1
+ export type Attributes = {
2
2
  readonly [key: string]: unknown;
3
3
  };
@@ -3,7 +3,7 @@ import type { PropsWithChildren } from 'react';
3
3
  import { DatadogProviderConfiguration } from '../../DdSdkReactNativeConfiguration';
4
4
  import type { PartialInitializationConfiguration, AutoInstrumentationConfiguration } from '../../DdSdkReactNativeConfiguration';
5
5
  import type { FileBasedConfiguration } from '../FileBasedConfiguration/FileBasedConfiguration';
6
- declare type Props = PropsWithChildren<{
6
+ type Props = PropsWithChildren<{
7
7
  /**
8
8
  * If a `DatadogProviderConfiguration` instance is passed, the SDK will start tracking errors, resources and actions and sending events.
9
9
  *
@@ -15,7 +15,7 @@ declare type Props = PropsWithChildren<{
15
15
  */
16
16
  onInitialization?: () => void;
17
17
  }>;
18
- declare type StaticProperties = {
18
+ type StaticProperties = {
19
19
  initialize: (configuration: PartialInitializationConfiguration) => Promise<void>;
20
20
  onInitialization?: () => void;
21
21
  };
@@ -1,6 +1,6 @@
1
1
  import type { Attributes } from '../AttributesSingleton/types';
2
2
  import type { UserInfo } from '../UserInfoSingleton/types';
3
- export declare type AdditionalEventDataForMapper = {
3
+ export type AdditionalEventDataForMapper = {
4
4
  userInfo: UserInfo;
5
5
  attributes: Attributes;
6
6
  };
@@ -1,4 +1,4 @@
1
- export declare type UserInfo = {
1
+ export type UserInfo = {
2
2
  readonly id?: string;
3
3
  readonly name?: string;
4
4
  readonly email?: string;
@@ -73,7 +73,7 @@ export declare class DdSdkConfiguration {
73
73
  /**
74
74
  * The entry point to initialize Datadog's features.
75
75
  */
76
- export declare type DdSdkType = {
76
+ export type DdSdkType = {
77
77
  /**
78
78
  * Initializes Datadog's features.
79
79
  * @param configuration: The configuration to use.
@@ -98,7 +98,7 @@ export declare type DdSdkType = {
98
98
  /**
99
99
  * The entry point to use Datadog's Trace feature.
100
100
  */
101
- export declare type DdTraceType = {
101
+ export type DdTraceType = {
102
102
  /**
103
103
  * Start a span, and returns a unique identifier for the span.
104
104
  * @param operation: The operation name of the span.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A Timestamp structure holding the
3
3
  */
4
- export declare type Timestamp = {
4
+ export type Timestamp = {
5
5
  unix: number;
6
6
  react_native: number | null;
7
7
  };
@@ -1 +1 @@
1
- export declare const version = "2.3.1";
1
+ export declare const version = "2.3.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/mobile-react-native",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "A client-side React Native module to interact with Datadog",
5
5
  "keywords": [
6
6
  "datadog",
@@ -97,5 +97,5 @@
97
97
  "javaPackageName": "com.datadog.reactnative"
98
98
  }
99
99
  },
100
- "gitHead": "5908b74a76a4046ed2e6993560eb616a6500cdf7"
100
+ "gitHead": "f9db01676449a1e3e31ad32ba20d1bcf360556e5"
101
101
  }
@@ -72,7 +72,7 @@ describe('DatadogProvider', () => {
72
72
  "clientToken": "fakeToken",
73
73
  "configurationForTelemetry": {
74
74
  "initializationType": "SYNC",
75
- "reactNativeVersion": "0.71.10",
75
+ "reactNativeVersion": "0.73.6",
76
76
  "reactVersion": "18.2.0",
77
77
  "trackErrors": true,
78
78
  "trackInteractions": true,
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '2.3.1';
2
+ export const version = '2.3.3';