Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Schema of all properties of a RUM event
*/
export type RumEvent = RumActionEvent | RumTransitionEvent | RumErrorEvent | RumLongTaskEvent | RumResourceEvent | RumViewEvent | RumViewUpdateEvent | RumVitalEvent;
export type RumEvent = RumActionEvent | RumTransitionEvent | RumErrorEvent | RumLongTaskEvent | RumResourceEvent | RumViewEvent | RumViewUpdateEvent | RumProcessEvent | RumVitalEvent;
/**
* Schema of all properties of an Action event
*/
Expand Down Expand Up @@ -879,6 +879,60 @@ export type RumViewUpdateEvent = ViewContainerSchema & StreamSchema & ViewProper
readonly type: 'view_update';
[k: string]: unknown;
};
/**
* Schema of all properties of a Process event
*/
export type RumProcessEvent = CommonProperties & {
/**
* RUM event type
*/
readonly type: 'process';
/**
* Process properties
*/
readonly process: {
/**
* UUID of the process
*/
readonly id: string;
/**
* Role of the process
*/
readonly role: 'main' | 'renderer' | 'utility';
/**
* OS process ID
*/
readonly pid: number;
/**
* Parent OS process ID
*/
readonly ppid?: number;
/**
* Process name
*/
readonly name?: string;
/**
* Process lifetime in nanoseconds
*/
readonly duration?: number;
/**
* Reason for process exit
*/
readonly exit_reason?: 'clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failed' | 'integrity-failure' | 'memory-eviction';
[k: string]: unknown;
};
/**
* Internal properties
*/
readonly _dd: {
/**
* Version of the update of the process event
*/
readonly document_version: number;
[k: string]: unknown;
};
[k: string]: unknown;
};
export type RumVitalEvent = RumVitalDurationEvent | RumVitalOperationStepEvent | RumVitalAppLaunchEvent;
/**
* Schema for a duration vital event.
Expand Down Expand Up @@ -1086,6 +1140,10 @@ export interface CommonProperties {
* User defined name of the view
*/
name?: string;
/**
* Whether this view was synthetically created to carry view-less events
*/
readonly is_fake?: boolean;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1368,6 +1426,24 @@ export interface CommonProperties {
readonly id: string;
[k: string]: unknown;
};
/**
* Process properties
*/
readonly process?: {
/**
* UUID of the process
*/
readonly id?: string;
/**
* Role of the process
*/
readonly role?: 'main' | 'renderer' | 'utility';
/**
* Process name
*/
readonly name?: string;
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
Expand Down
78 changes: 77 additions & 1 deletion lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Schema of all properties of a RUM event
*/
export type RumEvent = RumActionEvent | RumTransitionEvent | RumErrorEvent | RumLongTaskEvent | RumResourceEvent | RumViewEvent | RumViewUpdateEvent | RumVitalEvent;
export type RumEvent = RumActionEvent | RumTransitionEvent | RumErrorEvent | RumLongTaskEvent | RumResourceEvent | RumViewEvent | RumViewUpdateEvent | RumProcessEvent | RumVitalEvent;
/**
* Schema of all properties of an Action event
*/
Expand Down Expand Up @@ -879,6 +879,60 @@ export type RumViewUpdateEvent = ViewContainerSchema & StreamSchema & ViewProper
readonly type: 'view_update';
[k: string]: unknown;
};
/**
* Schema of all properties of a Process event
*/
export type RumProcessEvent = CommonProperties & {
/**
* RUM event type
*/
readonly type: 'process';
/**
* Process properties
*/
readonly process: {
/**
* UUID of the process
*/
readonly id: string;
/**
* Role of the process
*/
readonly role: 'main' | 'renderer' | 'utility';
/**
* OS process ID
*/
readonly pid: number;
/**
* Parent OS process ID
*/
readonly ppid?: number;
/**
* Process name
*/
readonly name?: string;
/**
* Process lifetime in nanoseconds
*/
readonly duration?: number;
/**
* Reason for process exit
*/
readonly exit_reason?: 'clean-exit' | 'abnormal-exit' | 'killed' | 'crashed' | 'oom' | 'launch-failed' | 'integrity-failure' | 'memory-eviction';
[k: string]: unknown;
};
/**
* Internal properties
*/
readonly _dd: {
/**
* Version of the update of the process event
*/
readonly document_version: number;
[k: string]: unknown;
};
[k: string]: unknown;
};
export type RumVitalEvent = RumVitalDurationEvent | RumVitalOperationStepEvent | RumVitalAppLaunchEvent;
/**
* Schema for a duration vital event.
Expand Down Expand Up @@ -1086,6 +1140,10 @@ export interface CommonProperties {
* User defined name of the view
*/
name?: string;
/**
* Whether this view was synthetically created to carry view-less events
*/
readonly is_fake?: boolean;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1368,6 +1426,24 @@ export interface CommonProperties {
readonly id: string;
[k: string]: unknown;
};
/**
* Process properties
*/
readonly process?: {
/**
* UUID of the process
*/
readonly id?: string;
/**
* Role of the process
*/
readonly role?: 'main' | 'renderer' | 'utility';
/**
* Process name
*/
readonly name?: string;
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
Expand Down
30 changes: 30 additions & 0 deletions samples/rum-events/process.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"type": "process",
"date": 1591284428705,
"application": {
"id": "ac8218cf-498b-4d33-bd44-151095959547"
},
"session": {
"id": "cacbf45c-3a05-48ce-b066-d76349460599",
"type": "user"
},
"view": {
"id": "cacbf45c-3a05-48ce-b066-d76349460599",
"url": "electron://fake",
"is_fake": true
},
"source": "electron",
"process": {
"id": "b1a2c3d4-e5f6-7890-abcd-ef1234567890",
"role": "renderer",
"pid": 1236,
"ppid": 1234,
"name": "renderer",
"duration": 220000000000,
"exit_reason": "clean-exit"
},
"_dd": {
"format_version": 2,
"document_version": 1
}
}
3 changes: 3 additions & 0 deletions schemas/rum-events-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
{
"$ref": "rum/view_update-schema.json"
},
{
"$ref": "rum/process-schema.json"
},
{
"title": "RumVitalEvent",
"oneOf": [
Expand Down
29 changes: 29 additions & 0 deletions schemas/rum/_common-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@
"type": "string",
"description": "User defined name of the view",
"readOnly": false
},
"is_fake": {
"type": "boolean",
"description": "Whether this view was synthetically created to carry view-less events",
"readOnly": true
}
},
"readOnly": true
Expand Down Expand Up @@ -502,6 +507,30 @@
"readOnly": true
}
}
},
"process": {
"type": "object",
"description": "Process properties",
"properties": {
"id": {
"type": "string",
"description": "UUID of the process",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"readOnly": true
},
"role": {
Comment thread
bcaudan marked this conversation as resolved.
"type": "string",
"description": "Role of the process",
"enum": ["main", "renderer", "utility"],
"readOnly": true
},
"name": {
"type": "string",
"description": "Process name",
"readOnly": true
}
},
"readOnly": true
}
}
}
95 changes: 95 additions & 0 deletions schemas/rum/process-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "rum/process-schema.json",
"title": "RumProcessEvent",
"type": "object",
"description": "Schema of all properties of a Process event",
"allOf": [
{
"$ref": "_common-schema.json"
},
{
"required": ["type", "process", "_dd"],
"properties": {
"type": {
"type": "string",
"description": "RUM event type",
"const": "process",
"readOnly": true
},
"process": {
"type": "object",
"description": "Process properties",
"required": ["id", "role", "pid"],
"properties": {
"id": {
"type": "string",
"description": "UUID of the process",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"readOnly": true
},
"role": {
"type": "string",
"description": "Role of the process",
"enum": ["main", "renderer", "utility"],
"readOnly": true
},
"pid": {
"type": "integer",
"description": "OS process ID",
"minimum": 0,
"readOnly": true
},
"ppid": {
"type": "integer",
"description": "Parent OS process ID",
"minimum": 0,
"readOnly": true
},
"name": {
"type": "string",
"description": "Process name",
"readOnly": true
},
"duration": {
"type": "integer",
"description": "Process lifetime in nanoseconds",
"minimum": 0,
"readOnly": true
},
Comment on lines +54 to +59

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 thought: ‏Used date / process.duration instead of process.start / process.end to be consistent with other events.

"exit_reason": {
"type": "string",
"description": "Reason for process exit",
"enum": [
"clean-exit",
"abnormal-exit",
"killed",
"crashed",
"oom",
"launch-failed",
"integrity-failure",
"memory-eviction"
],
"readOnly": true
}
},
"readOnly": true
},
"_dd": {
"type": "object",
"description": "Internal properties",
"required": ["document_version"],
"properties": {
"document_version": {
"type": "integer",
"description": "Version of the update of the process event",
"minimum": 0,
"readOnly": true
}
},
"readOnly": true
}
}
}
]
}
Loading