Skip to content

Commit bd908bc

Browse files
committed
Moved view-hierarchy native docs to develop-docs
1 parent ade1262 commit bd908bc

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Attachments
3+
sidebar_order: 20
4+
---
5+
6+
## View Hierarchy
7+
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)).
8+
9+
10+
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:
11+
12+
```c
13+
sentry_options_add_view_hierarchy(options, "./view-hierarchy.json");
14+
```
15+
16+
17+
<Alert>
18+
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.
19+
</Alert>
20+
21+
Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such:
22+
23+
<Include name="common-imgs/viewhierarchy-example" />

0 commit comments

Comments
 (0)