From 1334091ccc0cf548a72f781e3f4ac51c6bd743c3 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 1 Apr 2025 16:08:55 +0200 Subject: [PATCH 1/3] Add view hierarchy docs for Native --- .../common/enriching-events/attachments/index.mdx | 10 ++++++++++ .../enriching-events/attach-viewhierarchy/native.mdx | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 platform-includes/enriching-events/attach-viewhierarchy/native.mdx diff --git a/docs/platforms/native/common/enriching-events/attachments/index.mdx b/docs/platforms/native/common/enriching-events/attachments/index.mdx index 9b5e2bbf5cd6c..3a2fdb61037b7 100644 --- a/docs/platforms/native/common/enriching-events/attachments/index.mdx +++ b/docs/platforms/native/common/enriching-events/attachments/index.mdx @@ -56,3 +56,13 @@ Alternately, attachments also appear in the _Attachments_ tab on the **Issue Det If you chose to limit the number of crash reports per issue, you can show _Only Crash Reports_. This removes all other attachments from the list, which can be useful if the issue has accumulated a large number of events. + +## Attaching view hierarchy + + + + The file must have the exact name `view-hierachy.json`, as described in [RFC#33](https://github.com/getsentry/rfcs/blob/main/text/0033-view-hierarchy.md). + +Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such: + + diff --git a/platform-includes/enriching-events/attach-viewhierarchy/native.mdx b/platform-includes/enriching-events/attach-viewhierarchy/native.mdx new file mode 100644 index 0000000000000..af0648953b8c9 --- /dev/null +++ b/platform-includes/enriching-events/attach-viewhierarchy/native.mdx @@ -0,0 +1,5 @@ +To add a view hierarchy attachment, the path to the file has to be configured when initializing the SDK. It will monitor the file and upload it along with any event or crash that is sent to Sentry: + +```c +sentry_options_add_view_hierarchy(options, "./view-hierarchy.json"); +``` From b1c2cd0d5080351d8b75a1ba50e11bc5f9df3333 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 29 Apr 2025 09:06:26 +0200 Subject: [PATCH 2/3] Revert "Add view hierarchy docs for Native" This reverts commit 8603a22d67c8815370c0c70ab9b101298c82529b. --- .../common/enriching-events/attachments/index.mdx | 10 ---------- .../enriching-events/attach-viewhierarchy/native.mdx | 5 ----- 2 files changed, 15 deletions(-) delete mode 100644 platform-includes/enriching-events/attach-viewhierarchy/native.mdx diff --git a/docs/platforms/native/common/enriching-events/attachments/index.mdx b/docs/platforms/native/common/enriching-events/attachments/index.mdx index 3a2fdb61037b7..9b5e2bbf5cd6c 100644 --- a/docs/platforms/native/common/enriching-events/attachments/index.mdx +++ b/docs/platforms/native/common/enriching-events/attachments/index.mdx @@ -56,13 +56,3 @@ Alternately, attachments also appear in the _Attachments_ tab on the **Issue Det If you chose to limit the number of crash reports per issue, you can show _Only Crash Reports_. This removes all other attachments from the list, which can be useful if the issue has accumulated a large number of events. - -## Attaching view hierarchy - - - - The file must have the exact name `view-hierachy.json`, as described in [RFC#33](https://github.com/getsentry/rfcs/blob/main/text/0033-view-hierarchy.md). - -Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such: - - diff --git a/platform-includes/enriching-events/attach-viewhierarchy/native.mdx b/platform-includes/enriching-events/attach-viewhierarchy/native.mdx deleted file mode 100644 index af0648953b8c9..0000000000000 --- a/platform-includes/enriching-events/attach-viewhierarchy/native.mdx +++ /dev/null @@ -1,5 +0,0 @@ -To add a view hierarchy attachment, the path to the file has to be configured when initializing the SDK. It will monitor the file and upload it along with any event or crash that is sent to Sentry: - -```c -sentry_options_add_view_hierarchy(options, "./view-hierarchy.json"); -``` From 7c5197c809259991ff4f8e5bbb1f862eb9aea603 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Tue, 29 Apr 2025 10:05:32 +0200 Subject: [PATCH 3/3] Moved view-hierarchy native docs to develop-docs --- .../native-sdks/attachments.mdx | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 develop-docs/sdk/platform-specifics/native-sdks/attachments.mdx diff --git a/develop-docs/sdk/platform-specifics/native-sdks/attachments.mdx b/develop-docs/sdk/platform-specifics/native-sdks/attachments.mdx new file mode 100644 index 0000000000000..9a52da0bca49c --- /dev/null +++ b/develop-docs/sdk/platform-specifics/native-sdks/attachments.mdx @@ -0,0 +1,23 @@ +--- +title: Attachments +sidebar_order: 20 +--- + +## View Hierarchy +The Native SDK allows you to attach a `view-hierarchy.json` file that follows the structure described in [RFC#33](https://github.com/getsentry/rfcs/blob/main/text/0033-view-hierarchy.md). This is mainly meant for downstream SDKs (e.g., [sentry-godot](https://github.com/getsentry/sentry-godot/pull/143)). + + +To add a view hierarchy attachment, the path to the file has to be configured when initializing the SDK. It will monitor the file and upload it along with any event or crash that is sent to Sentry: + +```c +sentry_options_add_view_hierarchy(options, "./view-hierarchy.json"); +``` + + + + When using `Crashpad` as the crash-capturing backend in the Native SDK, the file must have the exact name `view-hierarchy.json` to be parsed correctly by the ingestion pipeline. + + +Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such: + +