From 2561bd42735a7e293c3e1caf18a9babc51c4e3e9 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:53:23 +0100 Subject: [PATCH 1/3] Updated distribution keys to flattened versions --- .../data-model/event-payloads/contexts.mdx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/develop-docs/sdk/data-model/event-payloads/contexts.mdx b/develop-docs/sdk/data-model/event-payloads/contexts.mdx index 8d21932524591..96b602e3583c7 100644 --- a/develop-docs/sdk/data-model/event-payloads/contexts.mdx +++ b/develop-docs/sdk/data-model/event-payloads/contexts.mdx @@ -261,14 +261,17 @@ To summarize: : _Optional_. An unprocessed description string obtained by the operating system. For some well-known runtimes, Sentry will attempt to parse `name` and `version` from this string, if they are not explicitly given. -`distribution` +`distribution_name` -: _Optional_. An object that provides meta-data for Linux distributions. The values correspond to entries from the [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options) configuration. Contains the following keys: +: _Optional_. A stable name for each distribution. This maps to `ID` in `/etc/os-release` (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/feat/add_linux_distros_to_os_context/tests/fixtures/os_releases/distribution_names.txt). +`distribution_version` -- `name`: A stable name for each distribution. This maps to `ID` in `/etc/os-release` (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/feat/add_linux_distros_to_os_context/tests/fixtures/os_releases/distribution_names.txt). -- `version`: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in `/etc/os-release`. Distributions with rolling releases only, will not provide a version. -- `pretty_name`: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in `/etc/os-release` (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). +: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in `/etc/os-release`. Distributions with rolling releases only, will not provide a version. + +`distribution_pretty_name` + +: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in `/etc/os-release` (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). ### Example OS Context @@ -293,10 +296,9 @@ The OS Context for the 3 major OSs should look like this: "type": "os", "name": "Linux", "version": "6.1.82(99.168.amzn2023.x86_64)", - "distribution": { - "name": "amzn", - "version": "2023", - "pretty_name": "Amazon Linux 2023.4.20240401" + "distribution_name": "amzn", + "distribution_version": "2023", + "distribution_pretty_name": "Amazon Linux 2023.4.20240401" } } } From f550f0840648c11c9be62331cf0b14f05548d21b Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:29:25 +0100 Subject: [PATCH 2/3] link to native main branch + os-release dos --- develop-docs/sdk/data-model/event-payloads/contexts.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/develop-docs/sdk/data-model/event-payloads/contexts.mdx b/develop-docs/sdk/data-model/event-payloads/contexts.mdx index 96b602e3583c7..6c1303e93e31a 100644 --- a/develop-docs/sdk/data-model/event-payloads/contexts.mdx +++ b/develop-docs/sdk/data-model/event-payloads/contexts.mdx @@ -263,15 +263,15 @@ To summarize: `distribution_name` -: _Optional_. A stable name for each distribution. This maps to `ID` in `/etc/os-release` (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/feat/add_linux_distros_to_os_context/tests/fixtures/os_releases/distribution_names.txt). +: _Optional_. A stable name for each distribution. This maps to `ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options) (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/master/tests/fixtures/os_releases/distribution_names.txt)) `distribution_version` -: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in `/etc/os-release`. Distributions with rolling releases only, will not provide a version. +: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options). Distributions with rolling releases only, will not provide a version. `distribution_pretty_name` -: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in `/etc/os-release` (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). +: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options) (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). ### Example OS Context From 6f4564df6ec32149d30e1dc797dcbf0066e18370 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:31:55 +0100 Subject: [PATCH 3/3] Change links to relevant Options entry --- develop-docs/sdk/data-model/event-payloads/contexts.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/develop-docs/sdk/data-model/event-payloads/contexts.mdx b/develop-docs/sdk/data-model/event-payloads/contexts.mdx index 6c1303e93e31a..f8be19f6723d3 100644 --- a/develop-docs/sdk/data-model/event-payloads/contexts.mdx +++ b/develop-docs/sdk/data-model/event-payloads/contexts.mdx @@ -263,15 +263,15 @@ To summarize: `distribution_name` -: _Optional_. A stable name for each distribution. This maps to `ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options) (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/master/tests/fixtures/os_releases/distribution_names.txt)) +: _Optional_. A stable name for each distribution. This maps to `ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#ID=) (examples: `ubuntu`, `rhel`, `alpine`; a full list of tested identifiers is available in the [Native SDK repository](https://github.com/getsentry/sentry-native/blob/master/tests/fixtures/os_releases/distribution_names.txt)) `distribution_version` -: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options). Distributions with rolling releases only, will not provide a version. +: _Optional_. Typically identifies at least the major release version number. This maps to `VERSION_ID` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#VERSION_ID=). Distributions with rolling releases only, will not provide a version. `distribution_pretty_name` -: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#Options) (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). +: _Optional_. Typically provides the full name, full version, and release alias. This maps to `PRETTY_NAME` in [`/etc/os-release`](https://www.freedesktop.org/software/systemd/man/latest/os-release.html#PRETTY_NAME=) (examples: `Ubuntu 22.04.4 LTS`, `Raspian GNU/Linux 10 (buster)`). ### Example OS Context