Skip to content
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" />