Skip to content

Commit bab49c3

Browse files
Remove Payload type from profiling schemas
1 parent 99c97ee commit bab49c3

8 files changed

Lines changed: 117 additions & 470 deletions

File tree

lib/cjs/generated/browserProfiling.d.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
/**
22
* DO NOT MODIFY IT BY HAND. Run `yarn generate` instead.
33
*/
4+
/**
5+
* Schema of Browser SDK Profiling types.
6+
*/
7+
export declare type BrowserProfiling = BrowserProfileEvent | BrowserProfilerTrace;
48
/**
59
* Schema of the Browser SDK Profile Event payload.
610
*/
7-
export interface BrowserProfileEvent {
11+
export declare type BrowserProfileEvent = ProfileCommonProperties & {
812
/**
9-
* Profile event metadata.
13+
* Profile data format.
1014
*/
11-
readonly event: ProfileCommonProperties & {
12-
/**
13-
* Profile data format.
14-
*/
15-
readonly format: 'json';
15+
readonly format: 'json';
16+
/**
17+
* Datadog internal metadata.
18+
*/
19+
readonly _dd: {
1620
/**
17-
* Datadog internal metadata.
21+
* Clock drift value. Used by Browser SDK.
1822
*/
19-
readonly _dd: {
20-
/**
21-
* Clock drift value. Used by Browser SDK.
22-
*/
23-
readonly clock_drift: number;
24-
[k: string]: unknown;
25-
};
23+
readonly clock_drift: number;
2624
[k: string]: unknown;
2725
};
28-
readonly 'wall-time.json': BrowserProfilerTrace;
2926
[k: string]: unknown;
30-
}
27+
};
3128
/**
3229
* Schema of a Profile Event metadata. Contains attributes shared by all profiles.
3330
*/
@@ -107,7 +104,7 @@ export interface ProfileCommonProperties {
107104
[k: string]: unknown;
108105
}
109106
/**
110-
* The profiler trace data (wall-time profile).
107+
* Schema of a RUM profiler trace containing profiling data enriched with RUM context.
111108
*/
112109
export interface BrowserProfilerTrace {
113110
/**

lib/cjs/generated/profiling.d.ts

Lines changed: 17 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,41 @@
66
*/
77
export declare type Profiling = BrowserProfileEvent | MobileProfileEvent;
88
/**
9-
* Mobile SDK profiling event.
9+
* Browser SDK profiling payload.
1010
*/
11-
export declare type MobileProfileEvent = ProfileCommonProperties & {
11+
export declare type BrowserProfileEvent = ProfileCommonProperties & {
1212
/**
13-
* The RUM Vital this profile event is associated with.
13+
* Profile data format.
1414
*/
15-
readonly vital: {
15+
readonly format: 'json';
16+
/**
17+
* Datadog internal metadata.
18+
*/
19+
readonly _dd: {
1620
/**
17-
* Unique identifier of RUM Vital in the UUID format.
21+
* Clock drift value. Used by Browser SDK.
1822
*/
19-
readonly id: string;
23+
readonly clock_drift: number;
2024
[k: string]: unknown;
2125
};
2226
[k: string]: unknown;
2327
};
2428
/**
25-
* Browser SDK profiling payload.
29+
* Mobile SDK profiling event.
2630
*/
27-
export interface BrowserProfileEvent {
31+
export declare type MobileProfileEvent = ProfileCommonProperties & {
2832
/**
29-
* Profile event metadata.
33+
* The RUM Vital this profile event is associated with.
3034
*/
31-
readonly event: ProfileCommonProperties & {
32-
/**
33-
* Profile data format.
34-
*/
35-
readonly format: 'json';
35+
readonly vital: {
3636
/**
37-
* Datadog internal metadata.
37+
* Unique identifier of RUM Vital in the UUID format.
3838
*/
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;
4640
[k: string]: unknown;
4741
};
48-
readonly 'wall-time.json': BrowserProfilerTrace;
4942
[k: string]: unknown;
50-
}
43+
};
5144
/**
5245
* Schema of a Profile Event metadata. Contains attributes shared by all profiles.
5346
*/
@@ -126,138 +119,3 @@ export interface ProfileCommonProperties {
126119
readonly tags_profiler: string;
127120
[k: string]: unknown;
128121
}
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-
}

lib/esm/generated/browserProfiling.d.ts

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
/**
22
* DO NOT MODIFY IT BY HAND. Run `yarn generate` instead.
33
*/
4+
/**
5+
* Schema of Browser SDK Profiling types.
6+
*/
7+
export declare type BrowserProfiling = BrowserProfileEvent | BrowserProfilerTrace;
48
/**
59
* Schema of the Browser SDK Profile Event payload.
610
*/
7-
export interface BrowserProfileEvent {
11+
export declare type BrowserProfileEvent = ProfileCommonProperties & {
812
/**
9-
* Profile event metadata.
13+
* Profile data format.
1014
*/
11-
readonly event: ProfileCommonProperties & {
12-
/**
13-
* Profile data format.
14-
*/
15-
readonly format: 'json';
15+
readonly format: 'json';
16+
/**
17+
* Datadog internal metadata.
18+
*/
19+
readonly _dd: {
1620
/**
17-
* Datadog internal metadata.
21+
* Clock drift value. Used by Browser SDK.
1822
*/
19-
readonly _dd: {
20-
/**
21-
* Clock drift value. Used by Browser SDK.
22-
*/
23-
readonly clock_drift: number;
24-
[k: string]: unknown;
25-
};
23+
readonly clock_drift: number;
2624
[k: string]: unknown;
2725
};
28-
readonly 'wall-time.json': BrowserProfilerTrace;
2926
[k: string]: unknown;
30-
}
27+
};
3128
/**
3229
* Schema of a Profile Event metadata. Contains attributes shared by all profiles.
3330
*/
@@ -107,7 +104,7 @@ export interface ProfileCommonProperties {
107104
[k: string]: unknown;
108105
}
109106
/**
110-
* The profiler trace data (wall-time profile).
107+
* Schema of a RUM profiler trace containing profiling data enriched with RUM context.
111108
*/
112109
export interface BrowserProfilerTrace {
113110
/**

0 commit comments

Comments
 (0)