# Add GPU info to Sentry crashes \(\#36624\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/eeaadc098f189121d840849d4833dec4398364cb)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: eeaadc098f189121d840849d4833dec4398364cb

Requested commit: eeaadc098f189121d840849d4833dec4398364cb

Commit: eeaadc098f189121d840849d4833dec4398364cb

Tree: cefd316df402f5f3b0c4a07915cafe46d0c21bc8

Author: Ben Kunkle

Committer: GitHub

## Message

```
Add GPU info to Sentry crashes (#36624)

Closes #ISSUE

Adds system GPU collection to crash reporting. Currently this is Linux
only.

The system GPUs are determined by reading the `/sys/class/drm` directory
structure, rather than using the exisiting `gpui::Window::gpu_specs()`
method in order to gather more information, and so that the GPU context
is not dependent on Vulkan context initialization (i.e. we still get GPU
info when Zed fails to start because Vulkan failed to initialize).

Unfortunately, the `blade` APIs do not support querying which GPU _will_
be used, so we do not know which GPU was attempted to be used when
Vulkan context initialization fails, however, when Vulkan initialization
succeeds, we send a message to the crash handler containing the result
of `gpui::Window::gpu_specs()` to include the "Active" gpu in any crash
report that may occur

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

- [18fe68d991b8f63ef7f5d276eb052e055feea70a](https://git.cafe/gitcafe/zed/commit/18fe68d991b8f63ef7f5d276eb052e055feea70a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/eeaadc098f189121d840849d4833dec4398364cb?format=markdown)
