Skip to content

feat(native): add view hierarchy to develop docs #13544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2025
Merged
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
23 changes: 23 additions & 0 deletions develop-docs/sdk/platform-specifics/native-sdks/attachments.mdx
Original file line number Diff line number Diff line change
@@ -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");
```


<Alert>
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.
</Alert>

Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such:

<Include name="common-imgs/viewhierarchy-example" />