Skip to content

Commit a000651

Browse files
feat(native): add view hierarchy to develop docs (#13544)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> supersedes #13191 [Relevant Vercel Preview](https://develop-docs-git-feat-nativeview-hierarchy-option.sentry.dev/sdk/platform-specifics/native-sdks/attachments/) ## DESCRIBE YOUR PR Related to the Native SDK changes in getsentry/sentry-native#1191 ; since these are not useful for everyday native SDK users, but mainly for downstream SDK developers, we document this in the develop-docs instead of the user docs. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
1 parent 3432373 commit a000651

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
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)