Skip to content

Commit 8603a22

Browse files
committed
Add view hierarchy docs for Native
1 parent aa1fd1f commit 8603a22

File tree

2 files changed

+15
-0
lines changed
  • docs/platforms/native/common/enriching-events/attachments
  • platform-includes/enriching-events/attach-viewhierarchy

2 files changed

+15
-0
lines changed

docs/platforms/native/common/enriching-events/attachments/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,13 @@ Alternately, attachments also appear in the _Attachments_ tab on the **Issue Det
5656
<Include name="common-imgs/attachments-list-example" />
5757

5858
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.
59+
60+
## Attaching view hierarchy
61+
62+
<PlatformContent includePath="enriching-events/attach-viewhierarchy" />
63+
64+
<Alert> 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). </Alert>
65+
66+
Along with the file appearing in the _Attachments_ tab, it is visualized on the issue as such:
67+
68+
<Include name="common-imgs/viewhierarchy-example" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
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:
2+
3+
```c
4+
sentry_options_add_view_hierarchy(options, "./view-hierarchy.json");
5+
```

0 commit comments

Comments
 (0)