Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 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
64 changes: 63 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,50 @@ 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;
};
[k: string]: unknown;
};
export type RumVitalEvent = RumVitalDurationEvent | RumVitalOperationStepEvent | RumVitalAppLaunchEvent;
/**
* Schema for a duration vital event.
Expand Down Expand Up @@ -1368,6 +1412,20 @@ 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';
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
Expand Down Expand Up @@ -1976,6 +2034,10 @@ export interface ViewProperties {
* Profiling context
*/
profiling?: ProfilingInternalContextSchema;
/**
* Whether this view was synthetically created to carry view-less events
*/
readonly is_fake?: boolean;
[k: string]: unknown;
};
[k: string]: unknown;
Expand Down
64 changes: 63 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,50 @@ 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;
};
[k: string]: unknown;
};
export type RumVitalEvent = RumVitalDurationEvent | RumVitalOperationStepEvent | RumVitalAppLaunchEvent;
/**
* Schema for a duration vital event.
Expand Down Expand Up @@ -1368,6 +1412,20 @@ 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';
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
Expand Down Expand Up @@ -1976,6 +2034,10 @@ export interface ViewProperties {
* Profiling context
*/
profiling?: ProfilingInternalContextSchema;
/**
* Whether this view was synthetically created to carry view-less events
*/
readonly is_fake?: boolean;
[k: string]: unknown;
};
[k: string]: unknown;
Expand Down
28 changes: 28 additions & 0 deletions samples/rum-events/process.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"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"
},
"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
}
}
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
19 changes: 19 additions & 0 deletions schemas/rum/_common-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,25 @@
"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.
Outdated
"type": "string",
"description": "Role of the process",
"enum": ["main", "renderer", "utility"],
"readOnly": true
}
},
"readOnly": true
}
}
}
5 changes: 5 additions & 0 deletions schemas/rum/_view-properties-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,11 @@
"type": "object",
"description": "Profiling context",
"allOf": [{ "$ref": "./_profiling-internal-context-schema.json" }]
},
"is_fake": {
"type": "boolean",
"description": "Whether this view was synthetically created to carry view-less events",
"readOnly": true
}
}
}
Expand Down
81 changes: 81 additions & 0 deletions schemas/rum/process-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$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"],
"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
},
"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
}
}
}
]
}
Loading