@datadog/mobile-react-native-code-push 2.3.2 → 2.3.4
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/DdSdkReactNative.d.ts +5 -1
- package/lib/typescript/core/src/DdSdkReactNativeConfiguration.d.ts +7 -7
- package/lib/typescript/core/src/index.d.ts +5 -1
- package/lib/typescript/core/src/logs/types.d.ts +10 -10
- package/lib/typescript/core/src/nativeModulesTypes.d.ts +5 -5
- package/lib/typescript/core/src/rum/DdRum.d.ts +4 -0
- package/lib/typescript/core/src/rum/eventMappers/actionEventMapper.d.ts +4 -4
- package/lib/typescript/core/src/rum/eventMappers/errorEventMapper.d.ts +4 -4
- package/lib/typescript/core/src/rum/eventMappers/resourceEventMapper.d.ts +4 -4
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +3 -3
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/firstPartyHosts.d.ts +1 -1
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/XHRProxy/DatadogRumResource/ResourceReporter.d.ts +1 -1
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RequestProxy.d.ts +1 -1
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/requestProxy/interfaces/RumResource.d.ts +1 -1
- package/lib/typescript/core/src/rum/types.d.ts +7 -3
- package/lib/typescript/core/src/sdk/AttributesSingleton/types.d.ts +1 -1
- package/lib/typescript/core/src/sdk/DatadogProvider/Buffer/BoundedBuffer.d.ts +2 -0
- package/lib/typescript/core/src/sdk/DatadogProvider/DatadogProvider.d.ts +2 -2
- package/lib/typescript/core/src/sdk/EventMappers/EventMapper.d.ts +1 -1
- package/lib/typescript/core/src/sdk/UserInfoSingleton/types.d.ts +1 -1
- package/lib/typescript/core/src/specs/NativeDdRum.d.ts +4 -0
- package/lib/typescript/core/src/types.d.ts +2 -2
- package/lib/typescript/core/src/utils/Timer.d.ts +1 -1
- package/lib/typescript/core/src/utils/time-provider/DefaultTimeProvider.d.ts +7 -0
- package/lib/typescript/core/src/utils/{TimeProvider.d.ts → time-provider/TimeProvider.d.ts} +5 -7
- package/lib/typescript/core/src/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -11,9 +11,9 @@ export declare class DdSdkReactNative {
|
|
|
11
11
|
private static readonly DD_SDK_VERSION;
|
|
12
12
|
private static readonly DD_VERSION;
|
|
13
13
|
private static readonly DD_VERSION_SUFFIX;
|
|
14
|
-
private static wasInitialized;
|
|
15
14
|
private static wasAutoInstrumented;
|
|
16
15
|
private static features?;
|
|
16
|
+
private static _isInitialized;
|
|
17
17
|
/**
|
|
18
18
|
* Initializes the Datadog SDK.
|
|
19
19
|
* @param configuration the configuration for the SDK library
|
|
@@ -57,6 +57,10 @@ export declare class DdSdkReactNative {
|
|
|
57
57
|
* @returns a Promise
|
|
58
58
|
*/
|
|
59
59
|
static clearAllData: () => Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns `true` if the SDK was initialized, `false` otherwise.
|
|
62
|
+
*/
|
|
63
|
+
static isInitialized(): boolean;
|
|
60
64
|
private static buildConfiguration;
|
|
61
65
|
private static enableFeatures;
|
|
62
66
|
}
|
|
@@ -40,9 +40,9 @@ export declare enum BatchSize {
|
|
|
40
40
|
*/
|
|
41
41
|
SMALL = "SMALL"
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
43
|
+
export type FirstPartyHostsConfiguration = (FirstPartyHost | LegacyFirstPartyHost)[];
|
|
44
|
+
export type LegacyFirstPartyHost = string;
|
|
45
|
+
export type CustomEndpoints = {
|
|
46
46
|
rum?: string;
|
|
47
47
|
logs?: string;
|
|
48
48
|
trace?: string;
|
|
@@ -243,7 +243,7 @@ export declare class DdSdkReactNativeConfiguration {
|
|
|
243
243
|
* Auto Instrumentation configuration passed to DatadogProvider.
|
|
244
244
|
* Does not include default values.
|
|
245
245
|
*/
|
|
246
|
-
export
|
|
246
|
+
export type AutoInstrumentationConfiguration = {
|
|
247
247
|
readonly trackInteractions: boolean;
|
|
248
248
|
readonly trackResources: boolean;
|
|
249
249
|
readonly firstPartyHosts?: FirstPartyHostsConfiguration;
|
|
@@ -258,7 +258,7 @@ export declare type AutoInstrumentationConfiguration = {
|
|
|
258
258
|
/**
|
|
259
259
|
* Parameters needed to start auto instrumentation. Includes default values.
|
|
260
260
|
*/
|
|
261
|
-
export
|
|
261
|
+
export type AutoInstrumentationParameters = {
|
|
262
262
|
readonly trackInteractions: boolean;
|
|
263
263
|
readonly trackResources: boolean;
|
|
264
264
|
readonly firstPartyHosts: FirstPartyHostsConfiguration;
|
|
@@ -275,7 +275,7 @@ export declare type AutoInstrumentationParameters = {
|
|
|
275
275
|
* the older android jsc that can still be used.
|
|
276
276
|
*/
|
|
277
277
|
export declare const addDefaultValuesToAutoInstrumentationConfiguration: (features: AutoInstrumentationConfiguration) => AutoInstrumentationParameters;
|
|
278
|
-
export
|
|
278
|
+
export type PartialInitializationConfiguration = {
|
|
279
279
|
readonly clientToken: string;
|
|
280
280
|
readonly env: string;
|
|
281
281
|
readonly applicationId: string;
|
|
@@ -313,4 +313,4 @@ export declare enum InitializationMode {
|
|
|
313
313
|
SYNC = "SYNC",
|
|
314
314
|
ASYNC = "ASYNC"
|
|
315
315
|
}
|
|
316
|
-
export
|
|
316
|
+
export type InitializationModeForTelemetry = 'LEGACY' | 'SYNC' | 'ASYNC' | 'PARTIAL' | 'FILE';
|
|
@@ -11,4 +11,8 @@ import { RumActionType, ErrorSource, PropagatorType } from './rum/types';
|
|
|
11
11
|
import { DatadogProvider } from './sdk/DatadogProvider/DatadogProvider';
|
|
12
12
|
import { FileBasedConfiguration } from './sdk/FileBasedConfiguration/FileBasedConfiguration';
|
|
13
13
|
import { DdTrace } from './trace/DdTrace';
|
|
14
|
-
|
|
14
|
+
import { DefaultTimeProvider } from './utils/time-provider/DefaultTimeProvider';
|
|
15
|
+
import { TimeProvider } from './utils/time-provider/TimeProvider';
|
|
16
|
+
import type { Timestamp } from './utils/time-provider/TimeProvider';
|
|
17
|
+
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 };
|
|
18
|
+
export type { Timestamp };
|
|
@@ -2,7 +2,7 @@ import type { UserInfo } from '../sdk/UserInfoSingleton/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* The entry point to use Datadog's Logs feature.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type DdLogsType = {
|
|
6
6
|
/**
|
|
7
7
|
* Send a log with debug level.
|
|
8
8
|
* @param message: The message to send.
|
|
@@ -31,12 +31,12 @@ export declare type DdLogsType = {
|
|
|
31
31
|
/**
|
|
32
32
|
* Log input from developers
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export type RawLog = {
|
|
35
35
|
message: string;
|
|
36
36
|
context: object;
|
|
37
37
|
status: LogStatus;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type RawLogWithError = {
|
|
40
40
|
message: string;
|
|
41
41
|
errorKind: string;
|
|
42
42
|
errorMessage: string;
|
|
@@ -47,19 +47,19 @@ export declare type RawLogWithError = {
|
|
|
47
47
|
/**
|
|
48
48
|
* Log input for native SDKs
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
50
|
+
export type NativeLog = {
|
|
51
51
|
message: string;
|
|
52
52
|
context: object;
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type NativeLogWithError = {
|
|
55
55
|
message: string;
|
|
56
56
|
errorKind: string;
|
|
57
57
|
errorMessage: string;
|
|
58
58
|
stacktrace: string;
|
|
59
59
|
context: object;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type LogStatus = 'debug' | 'info' | 'warn' | 'error';
|
|
62
|
+
export type LogEvent = {
|
|
63
63
|
message: string;
|
|
64
64
|
context: object;
|
|
65
65
|
errorKind?: string;
|
|
@@ -69,9 +69,9 @@ export declare type LogEvent = {
|
|
|
69
69
|
readonly userInfo: UserInfo;
|
|
70
70
|
readonly attributes?: object;
|
|
71
71
|
};
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
export
|
|
72
|
+
export type LogEventMapper = (logEvent: LogEvent) => LogEvent | null;
|
|
73
|
+
export type LogArguments = [message: string, context?: object];
|
|
74
|
+
export type LogWithErrorArguments = [
|
|
75
75
|
message: string,
|
|
76
76
|
errorKind?: string,
|
|
77
77
|
errorMessage?: string,
|
|
@@ -9,11 +9,11 @@ import type { Spec as NativeDdTrace } from './specs/NativeDdTrace';
|
|
|
9
9
|
/**
|
|
10
10
|
* The entry point to use Datadog's Logs feature.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type DdNativeLogsType = NativeDdLogs;
|
|
13
13
|
/**
|
|
14
14
|
* The entry point to use Datadog's Trace feature.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type DdNativeTraceType = NativeDdTrace;
|
|
17
17
|
/**
|
|
18
18
|
* A configuration object to initialize Datadog's features.
|
|
19
19
|
*/
|
|
@@ -38,9 +38,9 @@ export interface DdNativeSdkType extends NativeDdSdk {
|
|
|
38
38
|
*/
|
|
39
39
|
initialize(configuration: DdNativeSdkConfiguration): Promise<void>;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
type ActionType = 'TAP' | 'SCROLL' | 'SWIPE' | 'BACK' | 'CUSTOM';
|
|
42
|
+
type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
|
|
43
|
+
type ErrorSource = 'NETWORK' | 'SOURCE' | 'CONSOLE' | 'WEBVIEW' | 'CUSTOM';
|
|
44
44
|
/**
|
|
45
45
|
* The entry point to use Datadog's RUM feature.
|
|
46
46
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GestureResponderEvent } from 'react-native';
|
|
2
|
+
import type { TimeProvider } from '../utils/time-provider/TimeProvider';
|
|
2
3
|
import type { ActionEventMapper } from './eventMappers/actionEventMapper';
|
|
3
4
|
import type { ErrorEventMapper } from './eventMappers/errorEventMapper';
|
|
4
5
|
import type { ResourceEventMapper } from './eventMappers/resourceEventMapper';
|
|
@@ -9,6 +10,7 @@ declare class DdRumWrapper implements DdRumType {
|
|
|
9
10
|
private errorEventMapper;
|
|
10
11
|
private resourceEventMapper;
|
|
11
12
|
private actionEventMapper;
|
|
13
|
+
private timeProvider;
|
|
12
14
|
startView: (key: string, name: string, context?: object, timestampMs?: number) => Promise<void>;
|
|
13
15
|
stopView: (key: string, context?: object, timestampMs?: number) => Promise<void>;
|
|
14
16
|
startAction: (type: RumActionType, name: string, context?: object, timestampMs?: number) => Promise<void>;
|
|
@@ -18,6 +20,7 @@ declare class DdRumWrapper implements DdRumType {
|
|
|
18
20
|
context?: object,
|
|
19
21
|
timestampMs?: number
|
|
20
22
|
] | [context?: object, timestampMs?: number]) => Promise<void>;
|
|
23
|
+
setTimeProvider: (timeProvider: TimeProvider) => void;
|
|
21
24
|
private callNativeStopAction;
|
|
22
25
|
private getStopActionNativeCallArgs;
|
|
23
26
|
addAction: (type: RumActionType, name: string, context?: object, timestampMs?: number, actionContext?: GestureResponderEvent) => Promise<void>;
|
|
@@ -27,6 +30,7 @@ declare class DdRumWrapper implements DdRumType {
|
|
|
27
30
|
addTiming: (name: string) => Promise<void>;
|
|
28
31
|
stopSession: () => Promise<void>;
|
|
29
32
|
addFeatureFlagEvaluation: (name: string, value: unknown) => Promise<void>;
|
|
33
|
+
getCurrentSessionId(): Promise<string | undefined>;
|
|
30
34
|
registerErrorEventMapper(errorEventMapper: ErrorEventMapper): void;
|
|
31
35
|
unregisterErrorEventMapper(): void;
|
|
32
36
|
registerResourceEventMapper(resourceEventMapper: ResourceEventMapper): void;
|
|
@@ -2,20 +2,20 @@ import type { GestureResponderEvent } from 'react-native';
|
|
|
2
2
|
import type { AdditionalEventDataForMapper } from '../../sdk/EventMappers/EventMapper';
|
|
3
3
|
import { EventMapper } from '../../sdk/EventMappers/EventMapper';
|
|
4
4
|
import type { RumActionType } from '../types';
|
|
5
|
-
|
|
5
|
+
type RawAction = {
|
|
6
6
|
readonly type: RumActionType;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
context: object;
|
|
9
9
|
readonly timestampMs: number;
|
|
10
10
|
actionContext?: GestureResponderEvent;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
type ActionEvent = RawAction & AdditionalEventDataForMapper;
|
|
13
|
+
type NativeAction = {
|
|
14
14
|
type: RumActionType;
|
|
15
15
|
name: string;
|
|
16
16
|
context: object;
|
|
17
17
|
timestampMs: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type ActionEventMapper = (event: ActionEvent) => ActionEvent | null;
|
|
20
20
|
export declare const generateActionEventMapper: (eventMapper: ActionEventMapper | undefined) => EventMapper<RawAction, ActionEvent, NativeAction>;
|
|
21
21
|
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { AdditionalEventDataForMapper } from '../../sdk/EventMappers/EventMapper';
|
|
2
2
|
import { EventMapper } from '../../sdk/EventMappers/EventMapper';
|
|
3
3
|
import type { ErrorSource } from '../types';
|
|
4
|
-
|
|
4
|
+
type RawError = {
|
|
5
5
|
message: string;
|
|
6
6
|
source: ErrorSource;
|
|
7
7
|
stacktrace: string;
|
|
8
8
|
context: object;
|
|
9
9
|
timestampMs: number;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type ErrorEvent = RawError & AdditionalEventDataForMapper;
|
|
12
|
+
type NativeError = {
|
|
13
13
|
message: string;
|
|
14
14
|
source: ErrorSource;
|
|
15
15
|
stacktrace: string;
|
|
16
16
|
context: object;
|
|
17
17
|
timestampMs: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type ErrorEventMapper = (event: ErrorEvent) => ErrorEvent | null;
|
|
20
20
|
export declare const generateErrorEventMapper: (eventMapper: ErrorEventMapper | undefined) => EventMapper<RawError, ErrorEvent, NativeError>;
|
|
21
21
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AdditionalEventDataForMapper } from '../../sdk/EventMappers/EventMapper';
|
|
2
2
|
import { EventMapper } from '../../sdk/EventMappers/EventMapper';
|
|
3
3
|
import type { ResourceKind } from '../types';
|
|
4
|
-
|
|
4
|
+
type RawResource = {
|
|
5
5
|
readonly key: string;
|
|
6
6
|
readonly statusCode: number;
|
|
7
7
|
readonly kind: ResourceKind;
|
|
@@ -10,8 +10,8 @@ declare type RawResource = {
|
|
|
10
10
|
readonly timestampMs: number;
|
|
11
11
|
resourceContext: XMLHttpRequest | undefined;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type ResourceEvent = RawResource & AdditionalEventDataForMapper;
|
|
14
|
+
type NativeResource = {
|
|
15
15
|
key: string;
|
|
16
16
|
statusCode: number;
|
|
17
17
|
kind: ResourceKind;
|
|
@@ -19,6 +19,6 @@ declare type NativeResource = {
|
|
|
19
19
|
context: object;
|
|
20
20
|
timestampMs: number;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type ResourceEventMapper = (event: ResourceEvent) => ResourceEvent | null;
|
|
23
23
|
export declare const generateResourceEventMapper: (eventMapper: ResourceEventMapper | undefined) => EventMapper<RawResource, ResourceEvent, NativeResource>;
|
|
24
24
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropagatorType } from '../../../types';
|
|
2
2
|
import type { RegexMap } from '../requestProxy/interfaces/RequestProxy';
|
|
3
3
|
import type { Hostname } from './firstPartyHosts';
|
|
4
|
-
export
|
|
4
|
+
export type DdRumResourceTracingAttributes = {
|
|
5
5
|
tracingStrategy: 'KEEP';
|
|
6
6
|
traceId: TraceId;
|
|
7
7
|
spanId: SpanId;
|
|
@@ -23,10 +23,10 @@ export declare const getTracingAttributes: ({ hostname, firstPartyHostsRegexMap,
|
|
|
23
23
|
* Using branded types will ensure we don't accidentally use
|
|
24
24
|
* traceId for spanId when generating headers.
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type TraceId = TraceIdentifier & {
|
|
27
27
|
_brand: 'traceId';
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type SpanId = TraceIdentifier & {
|
|
30
30
|
_brand: 'spanId';
|
|
31
31
|
};
|
|
32
32
|
export declare class TraceIdentifier {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FirstPartyHost, PropagatorType } from '../../../types';
|
|
2
2
|
import type { RegexMap } from '../requestProxy/interfaces/RequestProxy';
|
|
3
|
-
export
|
|
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
|
-
|
|
2
|
+
type ResourceMapper = (resource: RUMResource) => RUMResource | null;
|
|
3
3
|
export declare class ResourceReporter {
|
|
4
4
|
private mappers;
|
|
5
5
|
constructor(resourceMappers: ResourceMapper[]);
|
|
@@ -20,7 +20,7 @@ export interface RUMResource {
|
|
|
20
20
|
};
|
|
21
21
|
resourceContext?: XMLHttpRequest;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
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
|
|
4
|
+
export type DdRumType = {
|
|
5
5
|
/**
|
|
6
6
|
* Start tracking a RUM View.
|
|
7
7
|
* @param key: The view unique key identifier.
|
|
@@ -88,6 +88,10 @@ export declare type DdRumType = {
|
|
|
88
88
|
* Stops the current RUM Session.
|
|
89
89
|
*/
|
|
90
90
|
stopSession(): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns current session ID, or undefined if unavailable.
|
|
93
|
+
*/
|
|
94
|
+
getCurrentSessionId(): Promise<string | undefined>;
|
|
91
95
|
};
|
|
92
96
|
/**
|
|
93
97
|
* Describe the type of a RUM Action.
|
|
@@ -104,7 +108,7 @@ export declare enum RumActionType {
|
|
|
104
108
|
/** A custom action. */
|
|
105
109
|
CUSTOM = "CUSTOM"
|
|
106
110
|
}
|
|
107
|
-
export
|
|
111
|
+
export type ResourceKind = 'image' | 'xhr' | 'beacon' | 'css' | 'document' | 'fetch' | 'font' | 'js' | 'media' | 'other' | 'native';
|
|
108
112
|
export declare enum ErrorSource {
|
|
109
113
|
NETWORK = "NETWORK",
|
|
110
114
|
SOURCE = "SOURCE",
|
|
@@ -125,7 +129,7 @@ export declare enum PropagatorType {
|
|
|
125
129
|
B3 = "b3",
|
|
126
130
|
B3MULTI = "b3multi"
|
|
127
131
|
}
|
|
128
|
-
export
|
|
132
|
+
export type FirstPartyHost = {
|
|
129
133
|
match: string;
|
|
130
134
|
propagatorTypes: PropagatorType[];
|
|
131
135
|
};
|
|
@@ -9,6 +9,8 @@ export declare class BoundedBuffer extends DatadogBuffer {
|
|
|
9
9
|
addCallbackReturningId: (callback: () => Promise<string>) => Promise<string>;
|
|
10
10
|
addCallbackWithId: (callback: (id: string) => Promise<void>, bufferId: string) => Promise<void>;
|
|
11
11
|
drain: () => Promise<void>;
|
|
12
|
+
private logBufferOverflow;
|
|
13
|
+
private logRandomIdGenerationError;
|
|
12
14
|
private generateRandomBufferId;
|
|
13
15
|
private addTelemetryEvent;
|
|
14
16
|
private drainTelemetry;
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
3
|
+
export type AdditionalEventDataForMapper = {
|
|
4
4
|
userInfo: UserInfo;
|
|
5
5
|
attributes: Attributes;
|
|
6
6
|
};
|
|
@@ -87,6 +87,10 @@ export interface Spec extends TurboModule {
|
|
|
87
87
|
* @param value: The value of the feature flag, encapsulated in an Object to accept all types
|
|
88
88
|
*/
|
|
89
89
|
addFeatureFlagEvaluation(name: string, value: Object): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Get current Session ID, or `undefined` if not available.
|
|
92
|
+
*/
|
|
93
|
+
getCurrentSessionId(): Promise<string | undefined>;
|
|
90
94
|
}
|
|
91
95
|
declare const _default: Spec | null;
|
|
92
96
|
export default _default;
|
|
@@ -73,7 +73,7 @@ export declare class DdSdkConfiguration {
|
|
|
73
73
|
/**
|
|
74
74
|
* The entry point to initialize Datadog's features.
|
|
75
75
|
*/
|
|
76
|
-
export
|
|
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
|
|
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,20 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A Timestamp structure holding the
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Timestamp = {
|
|
5
5
|
unix: number;
|
|
6
|
-
|
|
6
|
+
reactNative: number | null;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Simple class providing timestamps in milliseconds.
|
|
10
10
|
* If available, it will use the `performance.now()` method, and will fallback on `Date.now()` otherwise.
|
|
11
11
|
*/
|
|
12
|
-
export declare class TimeProvider {
|
|
13
|
-
private canUsePerformanceNow;
|
|
12
|
+
export declare abstract class TimeProvider {
|
|
14
13
|
/** Keeps an average offset between the unix time and the provided timestamp. */
|
|
15
|
-
|
|
14
|
+
protected baseOffset: number;
|
|
16
15
|
constructor();
|
|
17
|
-
getTimestamp(): Timestamp;
|
|
16
|
+
abstract getTimestamp(): Timestamp;
|
|
18
17
|
now(): number;
|
|
19
|
-
private performanceNow;
|
|
20
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.3.
|
|
1
|
+
export declare const version = "2.3.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native-code-push",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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": "^2.3.
|
|
41
|
+
"@datadog/mobile-react-native": "^2.3.4",
|
|
42
42
|
"@testing-library/react-native": "7.0.2",
|
|
43
43
|
"react-native-builder-bob": "0.17.1",
|
|
44
44
|
"react-native-code-push": "7.0.5"
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
]
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "7293c15981edb7c5c523c7062866ef1bc2a7f339"
|
|
82
82
|
}
|