@datadog/mobile-react-native-code-push 1.6.0 → 1.7.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.
- package/lib/typescript/core/src/DdSdkReactNativeConfiguration.d.ts +47 -0
- package/lib/typescript/core/src/index.d.ts +2 -2
- package/lib/typescript/core/src/nativeModulesTypes.d.ts +7 -0
- package/lib/typescript/core/src/rum/DdRum.d.ts +1 -0
- package/lib/typescript/core/src/types.d.ts +4 -1
- package/lib/typescript/core/src/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -12,6 +12,34 @@ export declare enum VitalsUpdateFrequency {
|
|
|
12
12
|
RARE = "RARE",
|
|
13
13
|
NEVER = "NEVER"
|
|
14
14
|
}
|
|
15
|
+
export declare enum UploadFrequency {
|
|
16
|
+
/**
|
|
17
|
+
* Upload data every 1000ms.
|
|
18
|
+
*/
|
|
19
|
+
FREQUENT = "FREQUENT",
|
|
20
|
+
/**
|
|
21
|
+
* Upload data every 5000ms.
|
|
22
|
+
*/
|
|
23
|
+
AVERAGE = "AVERAGE",
|
|
24
|
+
/**
|
|
25
|
+
* Upload data every 10000ms.
|
|
26
|
+
*/
|
|
27
|
+
RARE = "RARE"
|
|
28
|
+
}
|
|
29
|
+
export declare enum BatchSize {
|
|
30
|
+
/**
|
|
31
|
+
* Upload less frequent, larger batches of data
|
|
32
|
+
*/
|
|
33
|
+
LARGE = "LARGE",
|
|
34
|
+
/**
|
|
35
|
+
* Use default size for batches of data
|
|
36
|
+
*/
|
|
37
|
+
MEDIUM = "MEDIUM",
|
|
38
|
+
/**
|
|
39
|
+
* Upload more frequent, smaller batches of data
|
|
40
|
+
*/
|
|
41
|
+
SMALL = "SMALL"
|
|
42
|
+
}
|
|
15
43
|
export declare type FirstPartyHostsConfiguration = (FirstPartyHost | LegacyFirstPartyHost)[];
|
|
16
44
|
export declare type LegacyFirstPartyHost = string;
|
|
17
45
|
/**
|
|
@@ -130,6 +158,22 @@ export declare class DdSdkReactNativeConfiguration {
|
|
|
130
158
|
* Enables tracking of frustration signals (error taps). Defaults to `true`.
|
|
131
159
|
*/
|
|
132
160
|
trackFrustrations: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Sets the preferred frequency for uploading batches of data.
|
|
163
|
+
*/
|
|
164
|
+
uploadFrequency: UploadFrequency;
|
|
165
|
+
/**
|
|
166
|
+
* Defines the Datadog SDK policy when batching data together before uploading it to Datadog servers.
|
|
167
|
+
* Smaller batches mean smaller but more network requests, whereas larger batches mean fewer but larger network requests.
|
|
168
|
+
*/
|
|
169
|
+
batchSize: BatchSize;
|
|
170
|
+
/**
|
|
171
|
+
* Enables tracking of RUM event when no RUM View is active.
|
|
172
|
+
*
|
|
173
|
+
* By default, background events are not tracked. Enabling this feature might increase the
|
|
174
|
+
* number of sessions tracked and impact your billing.
|
|
175
|
+
*/
|
|
176
|
+
trackBackgroundEvents: boolean;
|
|
133
177
|
logEventMapper: LogEventMapper | null;
|
|
134
178
|
errorEventMapper: ErrorEventMapper | null;
|
|
135
179
|
resourceEventMapper: ResourceEventMapper | null;
|
|
@@ -196,6 +240,9 @@ export declare type PartialInitializationConfiguration = {
|
|
|
196
240
|
readonly telemetrySampleRate?: number;
|
|
197
241
|
readonly vitalsUpdateFrequency?: VitalsUpdateFrequency;
|
|
198
242
|
readonly trackFrustrations?: boolean;
|
|
243
|
+
readonly uploadFrequency?: UploadFrequency;
|
|
244
|
+
readonly batchSize?: BatchSize;
|
|
245
|
+
readonly trackBackgroundEvents?: boolean;
|
|
199
246
|
};
|
|
200
247
|
export declare const buildConfigurationFromPartialConfiguration: (features: AutoInstrumentationConfiguration, configuration: PartialInitializationConfiguration) => DdSdkReactNativeConfiguration;
|
|
201
248
|
export declare class DatadogProviderConfiguration extends DdSdkReactNativeConfiguration {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatadogProviderConfiguration, DdSdkReactNativeConfiguration, InitializationMode, VitalsUpdateFrequency } from './DdSdkReactNativeConfiguration';
|
|
1
|
+
import { DatadogProviderConfiguration, DdSdkReactNativeConfiguration, InitializationMode, VitalsUpdateFrequency, UploadFrequency, BatchSize } from './DdSdkReactNativeConfiguration';
|
|
2
2
|
import { DdSdkReactNative } from './DdSdkReactNative';
|
|
3
3
|
import { InternalLog } from './InternalLog';
|
|
4
4
|
import { ProxyConfiguration, ProxyType } from './ProxyConfiguration';
|
|
@@ -9,4 +9,4 @@ import { DdRum } from './rum/DdRum';
|
|
|
9
9
|
import { RumActionType, ErrorSource, PropagatorType } from './rum/types';
|
|
10
10
|
import { DatadogProvider } from './sdk/DatadogProvider/DatadogProvider';
|
|
11
11
|
import { DdTrace } from './trace/DdTrace';
|
|
12
|
-
export { DatadogProvider, DatadogProviderConfiguration, InitializationMode, DdLogs, DdTrace, DdRum, RumActionType, ErrorSource, DdSdkReactNativeConfiguration, DdSdkReactNative, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType };
|
|
12
|
+
export { DatadogProvider, DatadogProviderConfiguration, InitializationMode, DdLogs, DdTrace, DdRum, RumActionType, ErrorSource, DdSdkReactNativeConfiguration, DdSdkReactNative, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize };
|
|
@@ -218,6 +218,13 @@ export declare type DdNativeRumType = {
|
|
|
218
218
|
* Stops the current RUM Session.
|
|
219
219
|
*/
|
|
220
220
|
stopSession(): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* Adds the result of evaluating a feature flag with a given name and value to the view.
|
|
223
|
+
* Feature flag evaluations are local to the active view and are cleared when the view is stopped.
|
|
224
|
+
* @param name: The name of the feature flag
|
|
225
|
+
* @param value: The value of the feature flag, encapsulated in an object to accept all types
|
|
226
|
+
*/
|
|
227
|
+
addFeatureFlagEvaluation(name: string, value: object): Promise<void>;
|
|
221
228
|
};
|
|
222
229
|
declare type ActionType = 'TAP' | 'SCROLL' | 'SWIPE' | 'BACK' | 'CUSTOM';
|
|
223
230
|
declare type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
|
|
@@ -26,6 +26,7 @@ declare class DdRumWrapper implements DdRumType {
|
|
|
26
26
|
addError(message: string, source: ErrorSource, stacktrace: string, context?: object, timestampMs?: number): Promise<void>;
|
|
27
27
|
addTiming(name: string): Promise<void>;
|
|
28
28
|
stopSession(): Promise<void>;
|
|
29
|
+
addFeatureFlagEvaluation(name: string, value: unknown): Promise<void>;
|
|
29
30
|
registerErrorEventMapper(errorEventMapper: ErrorEventMapper): void;
|
|
30
31
|
unregisterErrorEventMapper(): void;
|
|
31
32
|
registerResourceEventMapper(resourceEventMapper: ResourceEventMapper): void;
|
|
@@ -14,7 +14,10 @@ export declare class DdSdkConfiguration {
|
|
|
14
14
|
readonly additionalConfig: object;
|
|
15
15
|
readonly telemetrySampleRate: number;
|
|
16
16
|
readonly vitalsUpdateFrequency: string;
|
|
17
|
+
readonly uploadFrequency: string;
|
|
18
|
+
readonly batchSize: string;
|
|
17
19
|
readonly trackFrustrations: boolean;
|
|
20
|
+
readonly trackBackgroundEvents: boolean;
|
|
18
21
|
readonly configurationForTelemetry: {
|
|
19
22
|
initializationType: string;
|
|
20
23
|
trackErrors: boolean;
|
|
@@ -23,7 +26,7 @@ export declare class DdSdkConfiguration {
|
|
|
23
26
|
reactVersion: string;
|
|
24
27
|
reactNativeVersion: string;
|
|
25
28
|
};
|
|
26
|
-
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, trackFrustrations: boolean, configurationForTelemetry: {
|
|
29
|
+
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, uploadFrequency: string, batchSize: string, trackFrustrations: boolean, trackBackgroundEvents: boolean, configurationForTelemetry: {
|
|
27
30
|
initializationType: string;
|
|
28
31
|
trackErrors: boolean;
|
|
29
32
|
trackInteractions: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.
|
|
1
|
+
export declare const version = "1.7.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native-code-push",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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.
|
|
41
|
+
"@datadog/mobile-react-native": "^1.7.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": "
|
|
75
|
+
"gitHead": "e7eb5ba2ac1eefbacf5c60695c7d761560c4f2cb"
|
|
76
76
|
}
|