From 81052ff68ca0129a9e81ee9633b605468aa35f4f Mon Sep 17 00:00:00 2001 From: Barbora Plasovska Date: Mon, 20 Apr 2026 15:27:20 +0200 Subject: [PATCH 1/6] add timeseries memory and CPU event schemas --- schemas/rum-events-mobile-schema.json | 11 ++ schemas/rum/timeseries-cpu-schema.json | 155 +++++++++++++++++++++ schemas/rum/timeseries-memory-schema.json | 160 ++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 schemas/rum/timeseries-cpu-schema.json create mode 100644 schemas/rum/timeseries-memory-schema.json diff --git a/schemas/rum-events-mobile-schema.json b/schemas/rum-events-mobile-schema.json index 2c09d1b1..2314da7c 100644 --- a/schemas/rum-events-mobile-schema.json +++ b/schemas/rum-events-mobile-schema.json @@ -39,6 +39,17 @@ }, { "$ref": "telemetry-events-schema.json" + }, + { + "title": "RumTimeseriesEvent", + "oneOf": [ + { + "$ref": "rum/timeseries-memory-schema.json" + }, + { + "$ref": "rum/timeseries-cpu-schema.json" + } + ] } ] } diff --git a/schemas/rum/timeseries-cpu-schema.json b/schemas/rum/timeseries-cpu-schema.json new file mode 100644 index 00000000..20be7773 --- /dev/null +++ b/schemas/rum/timeseries-cpu-schema.json @@ -0,0 +1,155 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "rum/timeseries-cpu-schema.json", + "title": "RumTimeseriesCpuEvent", + "type": "object", + "description": "Schema for a CPU timeseries event.", + "required": ["_dd", "application", "date", "session", "source", "timeseries", "type"], + "properties": { + "type": { + "type": "string", + "description": "RUM event type", + "const": "timeseries", + "readOnly": true + }, + "_dd": { + "type": "object", + "description": "Internal properties", + "required": ["format_version"], + "properties": { + "format_version": { + "type": "integer", + "const": 2, + "description": "Version of the RUM event format", + "readOnly": true + } + }, + "readOnly": true + }, + "application": { + "type": "object", + "description": "Application properties", + "required": ["id"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the application", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + } + }, + "readOnly": true + }, + "session": { + "type": "object", + "description": "Session properties", + "required": ["id", "type"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the session", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of the session", + "enum": ["user", "synthetics", "ci_test"], + "readOnly": true + } + }, + "readOnly": true + }, + "source": { + "type": "string", + "description": "The source of this event", + "enum": [ + "android", + "ios", + "browser", + "flutter", + "react-native", + "roku", + "unity", + "kotlin-multiplatform", + "electron", + "rum-cpp" + ], + "readOnly": true + }, + "date": { + "type": "integer", + "description": "Start of the event in ms from epoch", + "minimum": 0, + "readOnly": true + }, + "service": { + "type": "string", + "description": "The service name for this application" + }, + "version": { + "type": "string", + "description": "The version for this application" + }, + "timeseries": { + "type": "object", + "description": "CPU timeseries properties", + "required": ["id", "name", "start", "end", "data"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the timeseries batch", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name identifying the timeseries metric", + "readOnly": true + }, + "start": { + "type": "integer", + "description": "Timestamp of the first sample in nanoseconds from epoch", + "readOnly": true + }, + "end": { + "type": "integer", + "description": "Timestamp of the last sample in nanoseconds from epoch", + "readOnly": true + }, + "data": { + "type": "array", + "description": "Array of CPU data points", + "items": { + "type": "object", + "description": "A single CPU data point", + "required": ["timestamp", "data_point"], + "properties": { + "timestamp": { + "type": "integer", + "description": "Sample timestamp in nanoseconds from epoch", + "readOnly": true + }, + "data_point": { + "type": "object", + "description": "CPU measurements for this sample", + "required": ["cpu_usage"], + "properties": { + "cpu_usage": { + "type": "number", + "description": "CPU usage as a percentage (0.0 to 100.0)", + "readOnly": true + } + }, + "readOnly": true + } + }, + "readOnly": true + }, + "readOnly": true + } + }, + "readOnly": true + } + } +} diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json new file mode 100644 index 00000000..b4de38fe --- /dev/null +++ b/schemas/rum/timeseries-memory-schema.json @@ -0,0 +1,160 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "rum/timeseries-memory-schema.json", + "title": "RumTimeseriesMemoryEvent", + "type": "object", + "description": "Schema for a memory timeseries event.", + "required": ["_dd", "application", "date", "session", "source", "timeseries", "type"], + "properties": { + "type": { + "type": "string", + "description": "RUM event type", + "const": "timeseries", + "readOnly": true + }, + "_dd": { + "type": "object", + "description": "Internal properties", + "required": ["format_version"], + "properties": { + "format_version": { + "type": "integer", + "const": 2, + "description": "Version of the RUM event format", + "readOnly": true + } + }, + "readOnly": true + }, + "application": { + "type": "object", + "description": "Application properties", + "required": ["id"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the application", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + } + }, + "readOnly": true + }, + "session": { + "type": "object", + "description": "Session properties", + "required": ["id", "type"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the session", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of the session", + "enum": ["user", "synthetics", "ci_test"], + "readOnly": true + } + }, + "readOnly": true + }, + "source": { + "type": "string", + "description": "The source of this event", + "enum": [ + "android", + "ios", + "browser", + "flutter", + "react-native", + "roku", + "unity", + "kotlin-multiplatform", + "electron", + "rum-cpp" + ], + "readOnly": true + }, + "date": { + "type": "integer", + "description": "Start of the event in ms from epoch", + "minimum": 0, + "readOnly": true + }, + "service": { + "type": "string", + "description": "The service name for this application" + }, + "version": { + "type": "string", + "description": "The version for this application" + }, + "timeseries": { + "type": "object", + "description": "Memory timeseries properties", + "required": ["id", "name", "start", "end", "data"], + "properties": { + "id": { + "type": "string", + "description": "UUID of the timeseries batch", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name identifying the timeseries metric", + "readOnly": true + }, + "start": { + "type": "integer", + "description": "Timestamp of the first sample in nanoseconds from epoch", + "readOnly": true + }, + "end": { + "type": "integer", + "description": "Timestamp of the last sample in nanoseconds from epoch", + "readOnly": true + }, + "data": { + "type": "array", + "description": "Array of memory data points", + "items": { + "type": "object", + "description": "A single memory data point", + "required": ["timestamp", "data_point"], + "properties": { + "timestamp": { + "type": "integer", + "description": "Sample timestamp in nanoseconds from epoch", + "readOnly": true + }, + "data_point": { + "type": "object", + "description": "Memory measurements for this sample", + "required": ["memory_max", "memory_percent"], + "properties": { + "memory_max": { + "type": "number", + "description": "Physical memory footprint of the process in bytes", + "readOnly": true + }, + "memory_percent": { + "type": "number", + "description": "Memory footprint as a percentage of total device RAM", + "readOnly": true + } + }, + "readOnly": true + } + }, + "readOnly": true + }, + "readOnly": true + } + }, + "readOnly": true + } + } +} From 018615c4f2d71276957a6c14b85258d109943537 Mon Sep 17 00:00:00 2001 From: Barbora Plasovska Date: Mon, 27 Apr 2026 15:41:13 +0200 Subject: [PATCH 2/6] add schema discriminator field to timeseries memory and CPU schemas --- schemas/rum/timeseries-cpu-schema.json | 8 +++++++- schemas/rum/timeseries-memory-schema.json | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/schemas/rum/timeseries-cpu-schema.json b/schemas/rum/timeseries-cpu-schema.json index 20be7773..385d9b50 100644 --- a/schemas/rum/timeseries-cpu-schema.json +++ b/schemas/rum/timeseries-cpu-schema.json @@ -94,7 +94,7 @@ "timeseries": { "type": "object", "description": "CPU timeseries properties", - "required": ["id", "name", "start", "end", "data"], + "required": ["id", "name", "schema", "start", "end", "data"], "properties": { "id": { "type": "string", @@ -107,6 +107,12 @@ "description": "Name identifying the timeseries metric", "readOnly": true }, + "schema": { + "type": "string", + "description": "Wire-shape discriminator for the data field", + "enum": ["object", "delta-scalar"], + "readOnly": true + }, "start": { "type": "integer", "description": "Timestamp of the first sample in nanoseconds from epoch", diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json index b4de38fe..7d162203 100644 --- a/schemas/rum/timeseries-memory-schema.json +++ b/schemas/rum/timeseries-memory-schema.json @@ -94,7 +94,7 @@ "timeseries": { "type": "object", "description": "Memory timeseries properties", - "required": ["id", "name", "start", "end", "data"], + "required": ["id", "name", "schema", "start", "end", "data"], "properties": { "id": { "type": "string", @@ -107,6 +107,12 @@ "description": "Name identifying the timeseries metric", "readOnly": true }, + "schema": { + "type": "string", + "description": "Wire-shape discriminator for the data field", + "enum": ["object", "delta-object"], + "readOnly": true + }, "start": { "type": "integer", "description": "Timestamp of the first sample in nanoseconds from epoch", From 2d12ee24c2fd4e85fba0f4f2e35dcbf75ddf344a Mon Sep 17 00:00:00 2001 From: Barbora Plasovska Date: Tue, 5 May 2026 14:28:40 +0200 Subject: [PATCH 3/6] constrain timeseries name to cpu/memory const values --- schemas/rum/timeseries-cpu-schema.json | 1 + schemas/rum/timeseries-memory-schema.json | 1 + 2 files changed, 2 insertions(+) diff --git a/schemas/rum/timeseries-cpu-schema.json b/schemas/rum/timeseries-cpu-schema.json index 385d9b50..7d08a7df 100644 --- a/schemas/rum/timeseries-cpu-schema.json +++ b/schemas/rum/timeseries-cpu-schema.json @@ -105,6 +105,7 @@ "name": { "type": "string", "description": "Name identifying the timeseries metric", + "const": "cpu", "readOnly": true }, "schema": { diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json index 7d162203..7d79da70 100644 --- a/schemas/rum/timeseries-memory-schema.json +++ b/schemas/rum/timeseries-memory-schema.json @@ -105,6 +105,7 @@ "name": { "type": "string", "description": "Name identifying the timeseries metric", + "const": "memory", "readOnly": true }, "schema": { From 6b55926cc5f8bb2ea62d68ae646231cfd4a23a41 Mon Sep 17 00:00:00 2001 From: Barbora Plasovska Date: Fri, 12 Jun 2026 11:50:14 +0200 Subject: [PATCH 4/6] Change memory max to memory footprint --- schemas/rum/timeseries-memory-schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json index 7d79da70..fb240441 100644 --- a/schemas/rum/timeseries-memory-schema.json +++ b/schemas/rum/timeseries-memory-schema.json @@ -140,9 +140,9 @@ "data_point": { "type": "object", "description": "Memory measurements for this sample", - "required": ["memory_max", "memory_percent"], + "required": ["memory_footprint", "memory_percent"], "properties": { - "memory_max": { + "memory_footprint": { "type": "number", "description": "Physical memory footprint of the process in bytes", "readOnly": true From 041b1454e9d814084db257176418a69234031cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barbora=20Pla=C5=A1ovsk=C3=A1?= <54357674+barboraplasovska@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:46:38 +0200 Subject: [PATCH 5/6] Update timeseries CPU and memory schemas to object-v2 flattened format (#406) --- schemas/rum/timeseries-cpu-schema.json | 49 ++++++++++--------- schemas/rum/timeseries-memory-schema.json | 57 +++++++++++++---------- 2 files changed, 58 insertions(+), 48 deletions(-) diff --git a/schemas/rum/timeseries-cpu-schema.json b/schemas/rum/timeseries-cpu-schema.json index 7d08a7df..bc7c72f8 100644 --- a/schemas/rum/timeseries-cpu-schema.json +++ b/schemas/rum/timeseries-cpu-schema.json @@ -111,7 +111,7 @@ "schema": { "type": "string", "description": "Wire-shape discriminator for the data field", - "enum": ["object", "delta-scalar"], + "const": "object-v2", "readOnly": true }, "start": { @@ -125,33 +125,36 @@ "readOnly": true }, "data": { - "type": "array", - "description": "Array of CPU data points", - "items": { - "type": "object", - "description": "A single CPU data point", - "required": ["timestamp", "data_point"], - "properties": { - "timestamp": { + "type": "object", + "description": "Flattened CPU data points", + "required": ["timestamps", "values"], + "properties": { + "timestamps": { + "type": "array", + "description": "Sample timestamps in nanoseconds from epoch", + "items": { "type": "integer", - "description": "Sample timestamp in nanoseconds from epoch", "readOnly": true }, - "data_point": { - "type": "object", - "description": "CPU measurements for this sample", - "required": ["cpu_usage"], - "properties": { - "cpu_usage": { + "readOnly": true + }, + "values": { + "type": "object", + "description": "CPU measurements, aligned index-for-index with timestamps", + "required": ["cpu_usage"], + "properties": { + "cpu_usage": { + "type": "array", + "description": "CPU usage as a percentage (0.0 to 100.0)", + "items": { "type": "number", - "description": "CPU usage as a percentage (0.0 to 100.0)", "readOnly": true - } - }, - "readOnly": true - } - }, - "readOnly": true + }, + "readOnly": true + } + }, + "readOnly": true + } }, "readOnly": true } diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json index fb240441..9e642e1a 100644 --- a/schemas/rum/timeseries-memory-schema.json +++ b/schemas/rum/timeseries-memory-schema.json @@ -111,7 +111,7 @@ "schema": { "type": "string", "description": "Wire-shape discriminator for the data field", - "enum": ["object", "delta-object"], + "const": "object-v2", "readOnly": true }, "start": { @@ -125,38 +125,45 @@ "readOnly": true }, "data": { - "type": "array", - "description": "Array of memory data points", - "items": { - "type": "object", - "description": "A single memory data point", - "required": ["timestamp", "data_point"], - "properties": { - "timestamp": { + "type": "object", + "description": "Flattened memory data points", + "required": ["timestamps", "values"], + "properties": { + "timestamps": { + "type": "array", + "description": "Sample timestamps in nanoseconds from epoch", + "items": { "type": "integer", - "description": "Sample timestamp in nanoseconds from epoch", "readOnly": true }, - "data_point": { - "type": "object", - "description": "Memory measurements for this sample", - "required": ["memory_footprint", "memory_percent"], - "properties": { - "memory_footprint": { + "readOnly": true + }, + "values": { + "type": "object", + "description": "Memory measurements, aligned index-for-index with timestamps", + "required": ["memory_footprint", "memory_percent"], + "properties": { + "memory_footprint": { + "type": "array", + "description": "Physical memory footprint of the process in kilobytes", + "items": { "type": "number", - "description": "Physical memory footprint of the process in bytes", "readOnly": true }, - "memory_percent": { + "readOnly": true + }, + "memory_percent": { + "type": "array", + "description": "Memory footprint as a percentage of total device RAM", + "items": { "type": "number", - "description": "Memory footprint as a percentage of total device RAM", "readOnly": true - } - }, - "readOnly": true - } - }, - "readOnly": true + }, + "readOnly": true + } + }, + "readOnly": true + } }, "readOnly": true } From 5914e67677927c997cbf407d0c6e30907d4c9f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barbora=20Pla=C5=A1ovsk=C3=A1?= <54357674+barboraplasovska@users.noreply.github.com> Date: Thu, 23 Jul 2026 16:23:22 +0200 Subject: [PATCH 6/6] add common schema reference to timeseries CPU and memory event schemas (#417) --- schemas/rum/timeseries-cpu-schema.json | 194 +++++++------------- schemas/rum/timeseries-memory-schema.json | 206 +++++++--------------- 2 files changed, 128 insertions(+), 272 deletions(-) diff --git a/schemas/rum/timeseries-cpu-schema.json b/schemas/rum/timeseries-cpu-schema.json index bc7c72f8..9e77f888 100644 --- a/schemas/rum/timeseries-cpu-schema.json +++ b/schemas/rum/timeseries-cpu-schema.json @@ -4,153 +4,82 @@ "title": "RumTimeseriesCpuEvent", "type": "object", "description": "Schema for a CPU timeseries event.", - "required": ["_dd", "application", "date", "session", "source", "timeseries", "type"], - "properties": { - "type": { - "type": "string", - "description": "RUM event type", - "const": "timeseries", - "readOnly": true + "allOf": [ + { + "$ref": "_common-schema.json" }, - "_dd": { - "type": "object", - "description": "Internal properties", - "required": ["format_version"], + { + "required": ["type", "timeseries"], "properties": { - "format_version": { - "type": "integer", - "const": 2, - "description": "Version of the RUM event format", - "readOnly": true - } - }, - "readOnly": true - }, - "application": { - "type": "object", - "description": "Application properties", - "required": ["id"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the application", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", - "readOnly": true - } - }, - "readOnly": true - }, - "session": { - "type": "object", - "description": "Session properties", - "required": ["id", "type"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the session", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", - "readOnly": true - }, "type": { "type": "string", - "description": "Type of the session", - "enum": ["user", "synthetics", "ci_test"], - "readOnly": true - } - }, - "readOnly": true - }, - "source": { - "type": "string", - "description": "The source of this event", - "enum": [ - "android", - "ios", - "browser", - "flutter", - "react-native", - "roku", - "unity", - "kotlin-multiplatform", - "electron", - "rum-cpp" - ], - "readOnly": true - }, - "date": { - "type": "integer", - "description": "Start of the event in ms from epoch", - "minimum": 0, - "readOnly": true - }, - "service": { - "type": "string", - "description": "The service name for this application" - }, - "version": { - "type": "string", - "description": "The version for this application" - }, - "timeseries": { - "type": "object", - "description": "CPU timeseries properties", - "required": ["id", "name", "schema", "start", "end", "data"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the timeseries batch", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "description": "RUM event type", + "const": "timeseries", "readOnly": true }, - "name": { - "type": "string", - "description": "Name identifying the timeseries metric", - "const": "cpu", - "readOnly": true - }, - "schema": { - "type": "string", - "description": "Wire-shape discriminator for the data field", - "const": "object-v2", - "readOnly": true - }, - "start": { - "type": "integer", - "description": "Timestamp of the first sample in nanoseconds from epoch", - "readOnly": true - }, - "end": { - "type": "integer", - "description": "Timestamp of the last sample in nanoseconds from epoch", - "readOnly": true - }, - "data": { + "timeseries": { "type": "object", - "description": "Flattened CPU data points", - "required": ["timestamps", "values"], + "description": "CPU timeseries properties", + "required": ["id", "name", "schema", "start", "end", "data"], "properties": { - "timestamps": { - "type": "array", - "description": "Sample timestamps in nanoseconds from epoch", - "items": { - "type": "integer", - "readOnly": true - }, + "id": { + "type": "string", + "description": "UUID of the timeseries batch", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", "readOnly": true }, - "values": { + "name": { + "type": "string", + "description": "Name identifying the timeseries metric", + "const": "cpu", + "readOnly": true + }, + "schema": { + "type": "string", + "description": "Wire-shape discriminator for the data field", + "const": "object-v2", + "readOnly": true + }, + "start": { + "type": "integer", + "description": "Timestamp of the first sample in nanoseconds from epoch", + "readOnly": true + }, + "end": { + "type": "integer", + "description": "Timestamp of the last sample in nanoseconds from epoch", + "readOnly": true + }, + "data": { "type": "object", - "description": "CPU measurements, aligned index-for-index with timestamps", - "required": ["cpu_usage"], + "description": "Flattened CPU data points", + "required": ["timestamps", "values"], "properties": { - "cpu_usage": { + "timestamps": { "type": "array", - "description": "CPU usage as a percentage (0.0 to 100.0)", + "description": "Sample timestamps in nanoseconds from epoch", "items": { - "type": "number", + "type": "integer", "readOnly": true }, "readOnly": true + }, + "values": { + "type": "object", + "description": "CPU measurements, aligned index-for-index with timestamps", + "required": ["cpu_usage"], + "properties": { + "cpu_usage": { + "type": "array", + "description": "CPU usage as a percentage (0.0 to 100.0)", + "items": { + "type": "number", + "readOnly": true + }, + "readOnly": true + } + }, + "readOnly": true } }, "readOnly": true @@ -158,8 +87,7 @@ }, "readOnly": true } - }, - "readOnly": true + } } - } + ] } diff --git a/schemas/rum/timeseries-memory-schema.json b/schemas/rum/timeseries-memory-schema.json index 9e642e1a..122f58d6 100644 --- a/schemas/rum/timeseries-memory-schema.json +++ b/schemas/rum/timeseries-memory-schema.json @@ -4,160 +4,89 @@ "title": "RumTimeseriesMemoryEvent", "type": "object", "description": "Schema for a memory timeseries event.", - "required": ["_dd", "application", "date", "session", "source", "timeseries", "type"], - "properties": { - "type": { - "type": "string", - "description": "RUM event type", - "const": "timeseries", - "readOnly": true + "allOf": [ + { + "$ref": "_common-schema.json" }, - "_dd": { - "type": "object", - "description": "Internal properties", - "required": ["format_version"], + { + "required": ["type", "timeseries"], "properties": { - "format_version": { - "type": "integer", - "const": 2, - "description": "Version of the RUM event format", - "readOnly": true - } - }, - "readOnly": true - }, - "application": { - "type": "object", - "description": "Application properties", - "required": ["id"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the application", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", - "readOnly": true - } - }, - "readOnly": true - }, - "session": { - "type": "object", - "description": "Session properties", - "required": ["id", "type"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the session", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", - "readOnly": true - }, "type": { "type": "string", - "description": "Type of the session", - "enum": ["user", "synthetics", "ci_test"], - "readOnly": true - } - }, - "readOnly": true - }, - "source": { - "type": "string", - "description": "The source of this event", - "enum": [ - "android", - "ios", - "browser", - "flutter", - "react-native", - "roku", - "unity", - "kotlin-multiplatform", - "electron", - "rum-cpp" - ], - "readOnly": true - }, - "date": { - "type": "integer", - "description": "Start of the event in ms from epoch", - "minimum": 0, - "readOnly": true - }, - "service": { - "type": "string", - "description": "The service name for this application" - }, - "version": { - "type": "string", - "description": "The version for this application" - }, - "timeseries": { - "type": "object", - "description": "Memory timeseries properties", - "required": ["id", "name", "schema", "start", "end", "data"], - "properties": { - "id": { - "type": "string", - "description": "UUID of the timeseries batch", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", + "description": "RUM event type", + "const": "timeseries", "readOnly": true }, - "name": { - "type": "string", - "description": "Name identifying the timeseries metric", - "const": "memory", - "readOnly": true - }, - "schema": { - "type": "string", - "description": "Wire-shape discriminator for the data field", - "const": "object-v2", - "readOnly": true - }, - "start": { - "type": "integer", - "description": "Timestamp of the first sample in nanoseconds from epoch", - "readOnly": true - }, - "end": { - "type": "integer", - "description": "Timestamp of the last sample in nanoseconds from epoch", - "readOnly": true - }, - "data": { + "timeseries": { "type": "object", - "description": "Flattened memory data points", - "required": ["timestamps", "values"], + "description": "Memory timeseries properties", + "required": ["id", "name", "schema", "start", "end", "data"], "properties": { - "timestamps": { - "type": "array", - "description": "Sample timestamps in nanoseconds from epoch", - "items": { - "type": "integer", - "readOnly": true - }, + "id": { + "type": "string", + "description": "UUID of the timeseries batch", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", "readOnly": true }, - "values": { + "name": { + "type": "string", + "description": "Name identifying the timeseries metric", + "const": "memory", + "readOnly": true + }, + "schema": { + "type": "string", + "description": "Wire-shape discriminator for the data field", + "const": "object-v2", + "readOnly": true + }, + "start": { + "type": "integer", + "description": "Timestamp of the first sample in nanoseconds from epoch", + "readOnly": true + }, + "end": { + "type": "integer", + "description": "Timestamp of the last sample in nanoseconds from epoch", + "readOnly": true + }, + "data": { "type": "object", - "description": "Memory measurements, aligned index-for-index with timestamps", - "required": ["memory_footprint", "memory_percent"], + "description": "Flattened memory data points", + "required": ["timestamps", "values"], "properties": { - "memory_footprint": { + "timestamps": { "type": "array", - "description": "Physical memory footprint of the process in kilobytes", + "description": "Sample timestamps in nanoseconds from epoch", "items": { - "type": "number", + "type": "integer", "readOnly": true }, "readOnly": true }, - "memory_percent": { - "type": "array", - "description": "Memory footprint as a percentage of total device RAM", - "items": { - "type": "number", - "readOnly": true + "values": { + "type": "object", + "description": "Memory measurements, aligned index-for-index with timestamps", + "required": ["memory_footprint", "memory_percent"], + "properties": { + "memory_footprint": { + "type": "array", + "description": "Physical memory footprint of the process in kilobytes", + "items": { + "type": "number", + "readOnly": true + }, + "readOnly": true + }, + "memory_percent": { + "type": "array", + "description": "Memory footprint as a percentage of total device RAM", + "items": { + "type": "number", + "readOnly": true + }, + "readOnly": true + } }, "readOnly": true } @@ -167,8 +96,7 @@ }, "readOnly": true } - }, - "readOnly": true + } } - } + ] }