|
6 | 6 | */ |
7 | 7 | export declare type Profiling = BrowserProfileEvent | MobileProfileEvent; |
8 | 8 | /** |
9 | | - * Mobile SDK profiling event. |
| 9 | + * Browser SDK profiling payload. |
10 | 10 | */ |
11 | | -export declare type MobileProfileEvent = ProfileCommonProperties & { |
| 11 | +export declare type BrowserProfileEvent = ProfileCommonProperties & { |
12 | 12 | /** |
13 | | - * The RUM Vital this profile event is associated with. |
| 13 | + * Profile data format. |
14 | 14 | */ |
15 | | - readonly vital: { |
| 15 | + readonly format: 'json'; |
| 16 | + /** |
| 17 | + * Datadog internal metadata. |
| 18 | + */ |
| 19 | + readonly _dd: { |
16 | 20 | /** |
17 | | - * Unique identifier of RUM Vital in the UUID format. |
| 21 | + * Clock drift value. Used by Browser SDK. |
18 | 22 | */ |
19 | | - readonly id: string; |
| 23 | + readonly clock_drift: number; |
20 | 24 | [k: string]: unknown; |
21 | 25 | }; |
22 | 26 | [k: string]: unknown; |
23 | 27 | }; |
24 | 28 | /** |
25 | | - * Browser SDK profiling payload. |
| 29 | + * Mobile SDK profiling event. |
26 | 30 | */ |
27 | | -export interface BrowserProfileEvent { |
| 31 | +export declare type MobileProfileEvent = ProfileCommonProperties & { |
28 | 32 | /** |
29 | | - * Profile event metadata. |
| 33 | + * The RUM Vital this profile event is associated with. |
30 | 34 | */ |
31 | | - readonly event: ProfileCommonProperties & { |
32 | | - /** |
33 | | - * Profile data format. |
34 | | - */ |
35 | | - readonly format: 'json'; |
| 35 | + readonly vital: { |
36 | 36 | /** |
37 | | - * Datadog internal metadata. |
| 37 | + * Unique identifier of RUM Vital in the UUID format. |
38 | 38 | */ |
39 | | - readonly _dd: { |
40 | | - /** |
41 | | - * Clock drift value. Used by Browser SDK. |
42 | | - */ |
43 | | - readonly clock_drift: number; |
44 | | - [k: string]: unknown; |
45 | | - }; |
| 39 | + readonly id: string; |
46 | 40 | [k: string]: unknown; |
47 | 41 | }; |
48 | | - readonly 'wall-time.json': BrowserProfilerTrace; |
49 | 42 | [k: string]: unknown; |
50 | | -} |
| 43 | +}; |
51 | 44 | /** |
52 | 45 | * Schema of a Profile Event metadata. Contains attributes shared by all profiles. |
53 | 46 | */ |
@@ -126,138 +119,3 @@ export interface ProfileCommonProperties { |
126 | 119 | readonly tags_profiler: string; |
127 | 120 | [k: string]: unknown; |
128 | 121 | } |
129 | | -/** |
130 | | - * The profiler trace data (wall-time profile). |
131 | | - */ |
132 | | -export interface BrowserProfilerTrace { |
133 | | - /** |
134 | | - * An array of profiler resources. |
135 | | - */ |
136 | | - readonly resources: string[]; |
137 | | - /** |
138 | | - * An array of profiler frames. |
139 | | - */ |
140 | | - readonly frames: ProfilerFrame[]; |
141 | | - /** |
142 | | - * An array of profiler stacks. |
143 | | - */ |
144 | | - readonly stacks: ProfilerStack[]; |
145 | | - /** |
146 | | - * An array of profiler samples. |
147 | | - */ |
148 | | - readonly samples: ProfilerSample[]; |
149 | | - startClocks: ClocksState; |
150 | | - endClocks: ClocksState; |
151 | | - clocksOrigin: ClocksState; |
152 | | - /** |
153 | | - * Sample interval in milliseconds. |
154 | | - */ |
155 | | - readonly sampleInterval: number; |
156 | | - /** |
157 | | - * List of detected long tasks. |
158 | | - */ |
159 | | - readonly longTasks: RumProfilerLongTaskEntry[]; |
160 | | - /** |
161 | | - * List of detected navigation entries. |
162 | | - */ |
163 | | - readonly views: RumViewEntry[]; |
164 | | - [k: string]: unknown; |
165 | | -} |
166 | | -/** |
167 | | - * Schema of a profiler frame from the JS Self-Profiling API. |
168 | | - */ |
169 | | -export interface ProfilerFrame { |
170 | | - /** |
171 | | - * A function instance name. |
172 | | - */ |
173 | | - readonly name: string; |
174 | | - /** |
175 | | - * Index in the trace.resources array. |
176 | | - */ |
177 | | - readonly resourceId?: number; |
178 | | - /** |
179 | | - * 1-based index of the line. |
180 | | - */ |
181 | | - readonly line?: number; |
182 | | - /** |
183 | | - * 1-based index of the column. |
184 | | - */ |
185 | | - readonly column?: number; |
186 | | - [k: string]: unknown; |
187 | | -} |
188 | | -/** |
189 | | - * Schema of a profiler stack from the JS Self-Profiling API. |
190 | | - */ |
191 | | -export interface ProfilerStack { |
192 | | - /** |
193 | | - * Index in the trace.stacks array. |
194 | | - */ |
195 | | - readonly parentId?: number; |
196 | | - /** |
197 | | - * Index in the trace.frames array. |
198 | | - */ |
199 | | - readonly frameId: number; |
200 | | - [k: string]: unknown; |
201 | | -} |
202 | | -/** |
203 | | - * Schema of a profiler sample from the JS Self-Profiling API. |
204 | | - */ |
205 | | -export interface ProfilerSample { |
206 | | - /** |
207 | | - * High resolution time relative to the profiling session's time origin. |
208 | | - */ |
209 | | - readonly timestamp: number; |
210 | | - /** |
211 | | - * Index in the trace.stacks array. |
212 | | - */ |
213 | | - readonly stackId?: number; |
214 | | - [k: string]: unknown; |
215 | | -} |
216 | | -/** |
217 | | - * Schema of timing state with both relative and absolute timestamps. |
218 | | - */ |
219 | | -export interface ClocksState { |
220 | | - /** |
221 | | - * Time relative to navigation start in milliseconds. |
222 | | - */ |
223 | | - readonly relative: number; |
224 | | - /** |
225 | | - * Epoch time in milliseconds. |
226 | | - */ |
227 | | - readonly timeStamp: number; |
228 | | - [k: string]: unknown; |
229 | | -} |
230 | | -/** |
231 | | - * Schema of a long task entry recorded during profiling. |
232 | | - */ |
233 | | -export interface RumProfilerLongTaskEntry { |
234 | | - /** |
235 | | - * RUM Long Task id. |
236 | | - */ |
237 | | - readonly id?: string; |
238 | | - /** |
239 | | - * Duration in ns of the long task or long animation frame. |
240 | | - */ |
241 | | - readonly duration: number; |
242 | | - /** |
243 | | - * Type of the event: long task or long animation frame |
244 | | - */ |
245 | | - readonly entryType: 'longtask' | 'long-animation-frame'; |
246 | | - startClocks: ClocksState; |
247 | | - [k: string]: unknown; |
248 | | -} |
249 | | -/** |
250 | | - * Schema of a RUM view entry recorded during profiling. |
251 | | - */ |
252 | | -export interface RumViewEntry { |
253 | | - startClocks: ClocksState; |
254 | | - /** |
255 | | - * RUM view id. |
256 | | - */ |
257 | | - readonly viewId: string; |
258 | | - /** |
259 | | - * RUM view name. |
260 | | - */ |
261 | | - readonly viewName?: string; |
262 | | - [k: string]: unknown; |
263 | | -} |
0 commit comments