@datadog/mobile-react-native-navigation 1.0.0-rc3 → 1.0.0-rc4

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.
@@ -5,6 +5,7 @@ import type { TrackingConsent } from "./TrackingConsent";
5
5
  */
6
6
  export declare class DdSdkReactNative {
7
7
  private static readonly DD_SOURCE_KEY;
8
+ private static readonly DD_SDK_VERSION;
8
9
  private static readonly DD_SERVICE_NAME;
9
10
  private static readonly DD_SDK_VERBOSITY_KEY;
10
11
  private static readonly DD_NATIVE_VIEW_TRACKING_KEY;
@@ -12,5 +12,6 @@ export declare class DdRumErrorTracking {
12
12
  static startTracking(): void;
13
13
  static onGlobalError(error: any, isFatal?: boolean): void;
14
14
  static onConsoleError(...params: unknown[]): void;
15
+ private static getErrorMessage;
15
16
  private static getErrorStackTrace;
16
17
  }
@@ -1,7 +1,11 @@
1
+ /// <reference types="react-native" />
1
2
  export declare const TRACE_ID_HEADER_KEY = "x-datadog-trace-id";
2
3
  export declare const PARENT_ID_HEADER_KEY = "x-datadog-parent-id";
3
4
  export declare const ORIGIN_HEADER_KEY = "x-datadog-origin";
5
+ export declare const SAMPLING_PRIORITY_HEADER_KEY = "x-datadog-sampling-priority";
6
+ export declare const SAMPLED_HEADER_KEY = "x-datadog-sampled";
4
7
  export declare const ORIGIN_RUM = "rum";
8
+ export declare function calculateResponseSize(xhr: XMLHttpRequest): number;
5
9
  /**
6
10
  * Provides RUM auto-instrumentation feature to track resources (fetch, XHR, axios) as RUM events.
7
11
  */
@@ -74,14 +74,14 @@ export declare type DdTraceType = {
74
74
  * Start a span, and returns a unique identifier for the span.
75
75
  * @param operation: The operation name of the span.
76
76
  * @param context: The additional context to send.
77
- * @param timestampMs: The timestamp when the operation started (in milliseconds).
77
+ * @param timestampMs: The timestamp when the operation started (in milliseconds). If not provided, current timestamp will be used.
78
78
  */
79
79
  startSpan(operation: string, context?: object, timestampMs?: number): Promise<string>;
80
80
  /**
81
81
  * Finish a started span.
82
82
  * @param spanId: The unique identifier of the span.
83
83
  * @param context: The additional context to send.
84
- * @param timestampMs: The timestamp when the operation stopped (in milliseconds).
84
+ * @param timestampMs: The timestamp when the operation stopped (in milliseconds). If not provided, current timestamp will be used.
85
85
  */
86
86
  finishSpan(spanId: string, context?: object, timestampMs?: number): Promise<void>;
87
87
  };
@@ -94,14 +94,14 @@ export declare type DdRumType = {
94
94
  * @param key: The view unique key identifier.
95
95
  * @param name: The view name.
96
96
  * @param context: The additional context to send.
97
- * @param timestampMs: The timestamp when the view started (in milliseconds).
97
+ * @param timestampMs: The timestamp when the view started (in milliseconds). If not provided, current timestamp will be used.
98
98
  */
99
99
  startView(key: string, name: string, context?: object, timestampMs?: number): Promise<void>;
100
100
  /**
101
101
  * Stop tracking a RUM View.
102
102
  * @param key: The view unique key identifier.
103
103
  * @param context: The additional context to send.
104
- * @param timestampMs: The timestamp when the view stopped (in milliseconds).
104
+ * @param timestampMs: The timestamp when the view stopped (in milliseconds). If not provided, current timestamp will be used.
105
105
  */
106
106
  stopView(key: string, context?: object, timestampMs?: number): Promise<void>;
107
107
  /**
@@ -109,13 +109,13 @@ export declare type DdRumType = {
109
109
  * @param type: The action type (tap, scroll, swipe, click, custom).
110
110
  * @param name: The action name.
111
111
  * @param context: The additional context to send.
112
- * @param timestampMs: The timestamp when the action started (in milliseconds).
112
+ * @param timestampMs: The timestamp when the action started (in milliseconds). If not provided, current timestamp will be used.
113
113
  */
114
114
  startAction(type: string, name: string, context?: object, timestampMs?: number): Promise<void>;
115
115
  /**
116
116
  * Stop tracking the ongoing RUM Action.
117
117
  * @param context: The additional context to send.
118
- * @param timestampMs: The timestamp when the action stopped (in milliseconds).
118
+ * @param timestampMs: The timestamp when the action stopped (in milliseconds). If not provided, current timestamp will be used.
119
119
  */
120
120
  stopAction(context?: object, timestampMs?: number): Promise<void>;
121
121
  /**
@@ -123,7 +123,7 @@ export declare type DdRumType = {
123
123
  * @param type: The action type (tap, scroll, swipe, click, custom).
124
124
  * @param name: The action name.
125
125
  * @param context: The additional context to send.
126
- * @param timestampMs: The timestamp when the action occurred (in milliseconds).
126
+ * @param timestampMs: The timestamp when the action occurred (in milliseconds). If not provided, current timestamp will be used.
127
127
  */
128
128
  addAction(type: string, name: string, context?: object, timestampMs?: number): Promise<void>;
129
129
  /**
@@ -132,7 +132,7 @@ export declare type DdRumType = {
132
132
  * @param method: The resource method (GET, POST, …).
133
133
  * @param url: The resource url.
134
134
  * @param context: The additional context to send.
135
- * @param timestampMs: The timestamp when the resource started (in milliseconds).
135
+ * @param timestampMs: The timestamp when the resource started (in milliseconds). If not provided, current timestamp will be used.
136
136
  */
137
137
  startResource(key: string, method: string, url: string, context?: object, timestampMs?: number): Promise<void>;
138
138
  /**
@@ -140,17 +140,18 @@ export declare type DdRumType = {
140
140
  * @param key: The resource unique key identifier.
141
141
  * @param statusCode: The resource status code.
142
142
  * @param kind: The resource's kind (xhr, document, image, css, font, …).
143
+ * @param size: The resource size in bytes. If size is unknown, use -1.
143
144
  * @param context: The additional context to send.
144
- * @param timestampMs: The timestamp when the resource stopped (in milliseconds).
145
+ * @param timestampMs: The timestamp when the resource stopped (in milliseconds). If not provided, current timestamp will be used.
145
146
  */
146
- stopResource(key: string, statusCode: number, kind: string, context?: object, timestampMs?: number): Promise<void>;
147
+ stopResource(key: string, statusCode: number, kind: string, size?: number, context?: object, timestampMs?: number): Promise<void>;
147
148
  /**
148
149
  * Add a RUM Error.
149
150
  * @param message: The error message.
150
151
  * @param source: The error source (network, source, console, logger, …).
151
152
  * @param stacktrace: The error stacktrace.
152
153
  * @param context: The additional context to send.
153
- * @param timestampMs: The timestamp when the error occurred (in milliseconds).
154
+ * @param timestampMs: The timestamp when the error occurred (in milliseconds). If not provided, current timestamp will be used.
154
155
  */
155
156
  addError(message: string, source: string, stacktrace: string, context?: object, timestampMs?: number): Promise<void>;
156
157
  /**
@@ -0,0 +1 @@
1
+ export declare const version = "1.0.0-rc4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/mobile-react-native-navigation",
3
- "version": "1.0.0-rc3",
3
+ "version": "1.0.0-rc4",
4
4
  "description": "A client-side React Native module to interact with Datadog",
5
5
  "keywords": [
6
6
  "datadog",
@@ -36,14 +36,14 @@
36
36
  "prepare": "bob build"
37
37
  },
38
38
  "devDependencies": {
39
- "@datadog/mobile-react-native": "^1.0.0-rc3",
39
+ "@datadog/mobile-react-native": "^1.0.0-rc4",
40
40
  "react-native-gesture-handler": "1.10.3",
41
41
  "react-native-navigation": "7.13.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@datadog/mobile-react-native": "^1.0.0-beta4",
45
45
  "react": ">=16.13.1",
46
- "react-native": "^0.63.4",
46
+ "react-native": ">=0.63.4 <1.0",
47
47
  "react-native-navigation": "^7.5.0"
48
48
  },
49
49
  "jest": {
@@ -70,5 +70,5 @@
70
70
  ]
71
71
  ]
72
72
  },
73
- "gitHead": "c7bd69ec21cb32929b0f90ebc1d9a97e55b0190d"
73
+ "gitHead": "c1bd4e6ded0b84298ca011eba679027ae7fe7841"
74
74
  }