@datadog/mobile-react-native-code-push 2.3.6 → 2.4.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 +5 -1
- package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts +12 -3
- package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.d.ts +2 -3
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/TracingIdentifier.d.ts +111 -0
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracing.d.ts +1 -24
- package/lib/typescript/core/src/rum/instrumentation/resourceTracking/distributedTracing/distributedTracingHeaders.d.ts +2 -0
- package/lib/typescript/core/src/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -77,6 +77,7 @@ export declare const DEFAULTS: {
|
|
|
77
77
|
getCustomEndpoints: () => {};
|
|
78
78
|
bundleLogsWithRum: boolean;
|
|
79
79
|
bundleLogsWithTraces: boolean;
|
|
80
|
+
useAccessibilityLabel: boolean;
|
|
80
81
|
};
|
|
81
82
|
/**
|
|
82
83
|
* The SDK configuration class.
|
|
@@ -90,6 +91,7 @@ export declare class DdSdkReactNativeConfiguration {
|
|
|
90
91
|
readonly trackResources: boolean;
|
|
91
92
|
readonly trackErrors: boolean;
|
|
92
93
|
readonly trackingConsent: TrackingConsent;
|
|
94
|
+
readonly useAccessibilityLabel: boolean;
|
|
93
95
|
/**
|
|
94
96
|
* Enables crash reporting for native platforms (iOS, Android). Default `false`.
|
|
95
97
|
*/
|
|
@@ -237,7 +239,7 @@ export declare class DdSdkReactNativeConfiguration {
|
|
|
237
239
|
[k: string]: any;
|
|
238
240
|
};
|
|
239
241
|
customEndpoints: CustomEndpoints;
|
|
240
|
-
constructor(clientToken: string, env: string, applicationId: string, trackInteractions?: boolean, trackResources?: boolean, trackErrors?: boolean, trackingConsent?: TrackingConsent);
|
|
242
|
+
constructor(clientToken: string, env: string, applicationId: string, trackInteractions?: boolean, trackResources?: boolean, trackErrors?: boolean, trackingConsent?: TrackingConsent, useAccessibilityLabel?: boolean);
|
|
241
243
|
}
|
|
242
244
|
/**
|
|
243
245
|
* Auto Instrumentation configuration passed to DatadogProvider.
|
|
@@ -253,6 +255,7 @@ export type AutoInstrumentationConfiguration = {
|
|
|
253
255
|
readonly errorEventMapper?: ErrorEventMapper | null;
|
|
254
256
|
readonly resourceEventMapper?: ResourceEventMapper | null;
|
|
255
257
|
readonly actionEventMapper?: ActionEventMapper | null;
|
|
258
|
+
readonly useAccessibilityLabel?: boolean;
|
|
256
259
|
readonly actionNameAttribute?: string;
|
|
257
260
|
};
|
|
258
261
|
/**
|
|
@@ -268,6 +271,7 @@ export type AutoInstrumentationParameters = {
|
|
|
268
271
|
readonly errorEventMapper: ErrorEventMapper | null;
|
|
269
272
|
readonly resourceEventMapper: ResourceEventMapper | null;
|
|
270
273
|
readonly actionEventMapper: ActionEventMapper | null;
|
|
274
|
+
readonly useAccessibilityLabel: boolean;
|
|
271
275
|
readonly actionNameAttribute?: string;
|
|
272
276
|
};
|
|
273
277
|
/**
|
package/lib/typescript/core/src/rum/instrumentation/interactionTracking/DdEventsInterceptor.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import type EventsInterceptor from './EventsInterceptor';
|
|
2
2
|
export declare const UNKNOWN_TARGET_NAME = "unknown_target";
|
|
3
|
+
export type DdEventsInterceptorOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies a custom prop to name RUM actions on elements having an `onPress` prop
|
|
6
|
+
* */
|
|
7
|
+
actionNameAttribute?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Determines whether the accessibility label can be used to resolve the action name.
|
|
10
|
+
* */
|
|
11
|
+
useAccessibilityLabel?: boolean;
|
|
12
|
+
};
|
|
3
13
|
export declare class DdEventsInterceptor implements EventsInterceptor {
|
|
4
14
|
static ACTION_EVENT_DROPPED_DEBUG_MESSAGE: string;
|
|
5
15
|
private debouncingStartedTimestamp;
|
|
6
16
|
private actionNameAttribute?;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
17
|
+
private useAccessibilityLabel;
|
|
18
|
+
constructor(options?: DdEventsInterceptorOptions);
|
|
10
19
|
interceptOnPress(...args: any[]): void;
|
|
11
20
|
private handleTargetEvent;
|
|
12
21
|
private resolveTargetName;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DdEventsInterceptorOptions } from './DdEventsInterceptor';
|
|
1
2
|
/**
|
|
2
3
|
* Provides RUM auto-instrumentation feature to track user interaction as RUM events.
|
|
3
4
|
* For now we are only covering the "onPress" events.
|
|
@@ -14,8 +15,6 @@ export declare class DdRumUserInteractionTracking {
|
|
|
14
15
|
* Please note that we are only considering as valid - for - tracking only the user interactions that have
|
|
15
16
|
* a visible output (either an UI state change or a Resource request)
|
|
16
17
|
*/
|
|
17
|
-
static startTracking(
|
|
18
|
-
actionNameAttribute?: string;
|
|
19
|
-
}): void;
|
|
18
|
+
static startTracking(options: DdEventsInterceptorOptions): void;
|
|
20
19
|
static stopTracking(): void;
|
|
21
20
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available formats for representing the {@link TracingIdentifier} as a string.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TracingIdFormat {
|
|
5
|
+
/**
|
|
6
|
+
* Decimal string representation of the full tracing id.
|
|
7
|
+
*/
|
|
8
|
+
decimal = 0,
|
|
9
|
+
/**
|
|
10
|
+
* The low bits of the tracing id as a decimal.
|
|
11
|
+
*/
|
|
12
|
+
lowDecimal = 1,
|
|
13
|
+
/**
|
|
14
|
+
* The high bits of the tracing id as a decimal.
|
|
15
|
+
*/
|
|
16
|
+
highDecimal = 2,
|
|
17
|
+
/**
|
|
18
|
+
* Hexadecimal string representation of the full tracing id.
|
|
19
|
+
*/
|
|
20
|
+
hex = 3,
|
|
21
|
+
/**
|
|
22
|
+
* Hexadecimal string representation of the low bits of the tracing id.
|
|
23
|
+
*/
|
|
24
|
+
lowHex = 4,
|
|
25
|
+
/**
|
|
26
|
+
* Hexadecimal string representation of the high bits of the tracing id.
|
|
27
|
+
*/
|
|
28
|
+
highHex = 5,
|
|
29
|
+
/**
|
|
30
|
+
* Padded hexadecimal string representation of the full tracing id.
|
|
31
|
+
*/
|
|
32
|
+
paddedHex = 6,
|
|
33
|
+
/**
|
|
34
|
+
* Padded hexadecimal string representation of the low bits of the tracing id.
|
|
35
|
+
*/
|
|
36
|
+
paddedLowHex = 7,
|
|
37
|
+
/**
|
|
38
|
+
* Padded hexadecimal string representation of the high bits of the tracing id.
|
|
39
|
+
*/
|
|
40
|
+
paddedHighHex = 8
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A {@link TracingIdentifier} used for Traces (128 bit).
|
|
44
|
+
*/
|
|
45
|
+
export type TraceId = TracingIdentifier & {
|
|
46
|
+
_brand: 'traceId';
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A {@link TracingIdentifier} used for Spans (64 bit).
|
|
50
|
+
*/
|
|
51
|
+
export type SpanId = TracingIdentifier & {
|
|
52
|
+
_brand: 'spanId';
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The tracing identifier type.
|
|
56
|
+
*/
|
|
57
|
+
export declare enum TracingIdType {
|
|
58
|
+
/**
|
|
59
|
+
* 128-bit UUID.
|
|
60
|
+
*/
|
|
61
|
+
trace = 0,
|
|
62
|
+
/**
|
|
63
|
+
* 64-bit UUID.
|
|
64
|
+
*/
|
|
65
|
+
span = 1
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A {@link TracingIdentifier} is a unique UUID that can be 64bit or 128bit, and provides
|
|
69
|
+
* convenient methods to represent it as a HEX or DECIMAL string, and it allows the masking
|
|
70
|
+
* of its low or high bits.
|
|
71
|
+
*
|
|
72
|
+
* Create a new identifier by calling {@link TracingIdentifier.createTraceId()} or
|
|
73
|
+
* {@link TracingIdentifier.createSpanId()}.
|
|
74
|
+
*/
|
|
75
|
+
export declare class TracingIdentifier {
|
|
76
|
+
/**
|
|
77
|
+
* Read-only generated ID as a {@link bigint}.
|
|
78
|
+
*/
|
|
79
|
+
readonly id: bigint;
|
|
80
|
+
/**
|
|
81
|
+
* Read-only type to determine whether the identifier is a {@link TraceId} or a {@link SpanId}.
|
|
82
|
+
*/
|
|
83
|
+
readonly type: TracingIdType;
|
|
84
|
+
/**
|
|
85
|
+
* Creates a new unique Trace ID.
|
|
86
|
+
* @returns the generated {@link TraceId}.
|
|
87
|
+
*/
|
|
88
|
+
static createTraceId(): TraceId;
|
|
89
|
+
/**
|
|
90
|
+
* Creates a new unique Span ID.
|
|
91
|
+
* @returns the generated {@link SpanId}.
|
|
92
|
+
*/
|
|
93
|
+
static createSpanId(): SpanId;
|
|
94
|
+
/**
|
|
95
|
+
* Private constructor to initialize the {@link TracingIdentifier} based on the given
|
|
96
|
+
* {@link TracingIdType}.
|
|
97
|
+
*/
|
|
98
|
+
private constructor();
|
|
99
|
+
/**
|
|
100
|
+
* Generates a unique ID with the given format.
|
|
101
|
+
* @param format - the desired format (64bit or 128bit).
|
|
102
|
+
* @returns the generated UUID as a {@link bigint}.
|
|
103
|
+
*/
|
|
104
|
+
private generateUUID;
|
|
105
|
+
/**
|
|
106
|
+
* Returns a string representation of the Tracing ID.
|
|
107
|
+
* @param format - The type of representation to use.
|
|
108
|
+
* @returns The ID as a string in the specified representation type.
|
|
109
|
+
*/
|
|
110
|
+
toString(format: TracingIdFormat): string;
|
|
111
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropagatorType } from '../../../types';
|
|
2
2
|
import type { RegexMap } from '../requestProxy/interfaces/RequestProxy';
|
|
3
|
+
import type { SpanId, TraceId } from './TracingIdentifier';
|
|
3
4
|
import type { Hostname } from './firstPartyHosts';
|
|
4
5
|
export type DdRumResourceTracingAttributes = {
|
|
5
6
|
tracingStrategy: 'KEEP';
|
|
@@ -19,27 +20,3 @@ export declare const getTracingAttributes: ({ hostname, firstPartyHostsRegexMap,
|
|
|
19
20
|
firstPartyHostsRegexMap: RegexMap;
|
|
20
21
|
tracingSamplingRate: number;
|
|
21
22
|
}) => DdRumResourceTracingAttributes;
|
|
22
|
-
/**
|
|
23
|
-
* Using branded types will ensure we don't accidentally use
|
|
24
|
-
* traceId for spanId when generating headers.
|
|
25
|
-
*/
|
|
26
|
-
export type TraceId = TraceIdentifier & {
|
|
27
|
-
_brand: 'traceId';
|
|
28
|
-
};
|
|
29
|
-
export type SpanId = TraceIdentifier & {
|
|
30
|
-
_brand: 'spanId';
|
|
31
|
-
};
|
|
32
|
-
export declare class TraceIdentifier {
|
|
33
|
-
private low;
|
|
34
|
-
private high;
|
|
35
|
-
constructor();
|
|
36
|
-
toString: (radix: number) => string;
|
|
37
|
-
/**
|
|
38
|
-
* This function pads the trace with `0`.
|
|
39
|
-
* It should not be used with a `length` lower than the trace, as we return the full trace in this case.
|
|
40
|
-
* @param radix radix for the trace
|
|
41
|
-
* @param length minimum length
|
|
42
|
-
* @returns padded string
|
|
43
|
-
*/
|
|
44
|
-
toPaddedString: (radix: number, length: number) => string;
|
|
45
|
-
}
|
|
@@ -7,6 +7,8 @@ export declare const ORIGIN_HEADER_KEY = "x-datadog-origin";
|
|
|
7
7
|
export declare const ORIGIN_RUM = "rum";
|
|
8
8
|
export declare const TRACE_ID_HEADER_KEY = "x-datadog-trace-id";
|
|
9
9
|
export declare const PARENT_ID_HEADER_KEY = "x-datadog-parent-id";
|
|
10
|
+
export declare const TAGS_HEADER_KEY = "x-datadog-tags";
|
|
11
|
+
export declare const DD_TRACE_ID_TAG = "_dd.p.tid";
|
|
10
12
|
/**
|
|
11
13
|
* OTel headers
|
|
12
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.4.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native-code-push",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.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": "^2.
|
|
41
|
+
"@datadog/mobile-react-native": "^2.4.0",
|
|
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": "3717f76f94bb68f6d871f84e38db5ba606eb7b06"
|
|
82
82
|
}
|