@datadog/mobile-react-native-code-push 1.2.0-beta1 → 1.2.0

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.
@@ -17,11 +17,8 @@ export declare class DdSdkReactNative {
17
17
  private static readonly DD_PROXY_PORT_KEY;
18
18
  private static readonly DD_PROXY_USERNAME_KEY;
19
19
  private static readonly DD_PROXY_PASSWORD_KEY;
20
- private static readonly DD_NATIVE_LONG_TASK_THRESHOLD_KEY;
21
- private static readonly NATIVE_LONG_TASK_THRESHOLD_MS;
22
20
  private static wasInitialized;
23
21
  private static wasAutoInstrumented;
24
- private static configuration?;
25
22
  private static features?;
26
23
  /**
27
24
  * Initializes the Datadog SDK.
@@ -38,10 +35,6 @@ export declare class DdSdkReactNative {
38
35
  * FOR INTERNAL USE ONLY.
39
36
  */
40
37
  static _enableFeaturesFromDatadogProvider(features: AutoInstrumentationConfiguration): Promise<void>;
41
- /**
42
- * FOR INTERNAL USE ONLY.
43
- */
44
- static _initializeFromDatadogProviderAsync: () => Promise<void>;
45
38
  /**
46
39
  * FOR INTERNAL USE ONLY.
47
40
  */
@@ -1,6 +1,12 @@
1
1
  import type { ProxyConfiguration } from './ProxyConfiguration';
2
2
  import type { SdkVerbosity } from './SdkVerbosity';
3
3
  import { TrackingConsent } from './TrackingConsent';
4
+ export declare enum VitalsUpdateFrequency {
5
+ FREQUENT = "FREQUENT",
6
+ AVERAGE = "AVERAGE",
7
+ RARE = "RARE",
8
+ NEVER = "NEVER"
9
+ }
4
10
  /**
5
11
  * The SDK configuration class.
6
12
  * It will be used to configure the SDK functionality at initialization.
@@ -13,6 +19,9 @@ export declare class DdSdkReactNativeConfiguration {
13
19
  readonly trackResources: boolean;
14
20
  readonly trackErrors: boolean;
15
21
  readonly trackingConsent: TrackingConsent;
22
+ /**
23
+ * Enables crash reporting for native plaforms (iOS, Android). Default `false`.
24
+ */
16
25
  nativeCrashReportEnabled: boolean;
17
26
  /**
18
27
  * @deprecated `sampleRate` has been replaced by `sessionSamplingRate` to avoid confusion with `resourceTracingSamplingRate` and will be removed in a future release.
@@ -27,10 +36,24 @@ export declare class DdSdkReactNativeConfiguration {
27
36
  */
28
37
  resourceTracingSamplingRate: number;
29
38
  site: string;
39
+ /**
40
+ * Verbosity for internal SDK logging.
41
+ * Set to `SdkVerbosity.DEBUG` to debug your SDK implementation.
42
+ */
30
43
  verbosity: SdkVerbosity | undefined;
44
+ /**
45
+ * Enables native views tracking.
46
+ * Set to `true` if you use a custom navigation system relying on native views.
47
+ */
31
48
  nativeViewTracking: boolean;
32
49
  proxyConfig?: ProxyConfiguration;
33
50
  serviceName?: string;
51
+ /**
52
+ * List of your backends hosts to enable tracing with.
53
+ * Regular expressions are NOT supported.
54
+ *
55
+ * Matches domains and subdomains, e.g. `['example.com']` matches `example.com` and `api.example.com`.
56
+ */
34
57
  firstPartyHosts: string[];
35
58
  /**
36
59
  * Overrides the reported version of the app.
@@ -62,6 +85,30 @@ export declare class DdSdkReactNativeConfiguration {
62
85
  * Android SDK is used, which is 20.
63
86
  */
64
87
  telemetrySampleRate: number;
88
+ /**
89
+ * The threshold for native long tasks reporting in milliseconds.
90
+ *
91
+ * - Setting it to `0` or `false` disables native long task reporting.
92
+ * - Values below `100` will be raised to `100`.
93
+ * - Values above `5000` will be lowered to `5000`.
94
+ *
95
+ * Default value is `200`.
96
+ */
97
+ nativeLongTaskThresholdMs: number | false;
98
+ /**
99
+ * The threshold for javascript long tasks reporting in milliseconds.
100
+ *
101
+ * - Setting it to `0` or `false` disables javascript long task reporting.
102
+ * - Values below `100` will be raised to `100`.
103
+ * - Values above `5000` will be lowered to `5000`.
104
+ *
105
+ * Default value is `0`
106
+ */
107
+ longTaskThresholdMs: number | false;
108
+ /**
109
+ * Sets the preferred frequency for collecting mobile vitals.
110
+ */
111
+ vitalsUpdateFrequency: VitalsUpdateFrequency;
65
112
  additionalConfig: {
66
113
  [k: string]: any;
67
114
  };
@@ -109,8 +156,11 @@ export declare type PartialInitializationConfiguration = {
109
156
  [k: string]: any;
110
157
  };
111
158
  readonly trackingConsent?: TrackingConsent;
159
+ readonly longTaskThresholdMs?: number | false;
160
+ readonly nativeLongTaskThresholdMs?: number | false;
112
161
  readonly nativeCrashReportEnabled?: boolean;
113
162
  readonly telemetrySampleRate?: number;
163
+ readonly vitalsUpdateFrequency?: VitalsUpdateFrequency;
114
164
  };
115
165
  export declare const buildConfigurationFromPartialConfiguration: (features: AutoInstrumentationConfiguration, configuration: PartialInitializationConfiguration) => DdSdkReactNativeConfiguration;
116
166
  export declare class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {
@@ -120,3 +170,4 @@ export declare enum InitializationMode {
120
170
  SYNC = "SYNC",
121
171
  ASYNC = "ASYNC"
122
172
  }
173
+ export declare type InitializationModeForTelemetry = 'LEGACY' | 'SYNC' | 'ASYNC' | 'PARTIAL';
@@ -1,4 +1,12 @@
1
1
  export declare const EMPTY_MESSAGE = "Unknown Error";
2
2
  export declare const EMPTY_STACK_TRACE = "";
3
3
  export declare const getErrorMessage: (error: any | undefined) => string;
4
+ /**
5
+ * Will extract the stack from the error, taking the first key found among:
6
+ * `stacktrace`, `stack`, `componentStack` (component tree for component errors,
7
+ * which contains only native components names in production).
8
+ *
9
+ * In last resort and if `sourceURL`, `line` and `column` are present, it will
10
+ * generate a stack from this information.
11
+ */
4
12
  export declare const getErrorStackTrace: (error: any | undefined) => string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Makes sure the long task threshold value is above 100 and below 5000.
3
+ * Also makes sure it is a number, passing `0` if it is `false`, as the React Native
4
+ * bridge cannot handle values with dual types.
5
+ */
6
+ export declare const adaptLongTaskThreshold: (longTaskThreshold: number | false) => number;
@@ -4,6 +4,7 @@ export declare type DdRumResourceTracingAttributes = {
4
4
  traceId: string;
5
5
  spanId: string;
6
6
  samplingPriorityHeader: '1';
7
+ rulePsr: number;
7
8
  } | {
8
9
  tracingStrategy: 'DISCARD';
9
10
  traceId?: void;
@@ -1,4 +1,4 @@
1
- import type { ResourceKind } from '../../../../../../../core/src/types';
1
+ import type { ResourceKind } from '../../../../../../src/types';
2
2
  import type { DdRumResourceTracingAttributes } from '../distributedTracing';
3
3
  export interface RUMResource {
4
4
  key: string;
@@ -6,12 +6,26 @@ export declare class DdSdkConfiguration {
6
6
  readonly env: string;
7
7
  readonly applicationId: string;
8
8
  readonly nativeCrashReportEnabled: boolean;
9
+ readonly nativeLongTaskThresholdMs: number;
10
+ readonly longTaskThresholdMs: number;
9
11
  readonly sampleRate: number;
10
12
  readonly site: string;
11
13
  readonly trackingConsent: string;
12
14
  readonly additionalConfig: object;
13
15
  readonly telemetrySampleRate: number;
14
- constructor(clientToken: string, env: string, applicationId: string, nativeCrashReportEnabled: boolean, sampleRate: number, site: string, trackingConsent: string, additionalConfig: object, telemetrySampleRate: number);
16
+ readonly vitalsUpdateFrequency: string;
17
+ readonly configurationForTelemetry: {
18
+ initializationType: string;
19
+ trackErrors: boolean;
20
+ trackInteractions: boolean;
21
+ trackNetworkRequests: boolean;
22
+ };
23
+ constructor(clientToken: string, env: string, applicationId: string, nativeCrashReportEnabled: boolean, nativeLongTaskThresholdMs: number, longTaskThresholdMs: number, sampleRate: number, site: string, trackingConsent: string, additionalConfig: object, telemetrySampleRate: number, vitalsUpdateFrequency: string, configurationForTelemetry: {
24
+ initializationType: string;
25
+ trackErrors: boolean;
26
+ trackInteractions: boolean;
27
+ trackNetworkRequests: boolean;
28
+ });
15
29
  }
16
30
  /**
17
31
  * The entry point to initialize Datadog's features.
@@ -1 +1 @@
1
- export declare const version = "1.2.0-beta1";
1
+ export declare const version = "1.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/mobile-react-native-code-push",
3
- "version": "1.2.0-beta1",
3
+ "version": "1.2.0",
4
4
  "description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
5
5
  "keywords": [
6
6
  "datadog",
@@ -38,7 +38,7 @@
38
38
  "prepare": "rm -rf lib && yarn bob build"
39
39
  },
40
40
  "devDependencies": {
41
- "@datadog/mobile-react-native": "^1.2.0-beta1",
41
+ "@datadog/mobile-react-native": "^1.2.0",
42
42
  "@testing-library/react-native": "7.0.2",
43
43
  "react-native-code-push": "7.0.5"
44
44
  },
@@ -72,5 +72,5 @@
72
72
  ]
73
73
  ]
74
74
  },
75
- "gitHead": "c367071a477296075f9140771e4c01f19dd40377"
75
+ "gitHead": "9208125e28748ba9781e5d22ed49551ee9743285"
76
76
  }