You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ac1163b
Browse filesBrowse the repository at this point in the historyBrowse files
docs(native): clean up deprecated APIs and use native in snippets (#20288)
## DESCRIBE YOUR PR
Direct use of `sentry-native` is no longer considered experimental.
Replace the experimental notice with the list of downstream SDKs and
mention the console SDKs.
Drop references to deprecated APIs in favor of their replacements:
`sentry_shutdown`, `sentry_regenerate_trace`,
`sentry_value_new_user_feedback`, `sentry_capture_user_feedback`, and
`sentry_options_add_view_hierarchy`.
Use the native backend explicitly in the CMake examples, split the
install example into macOS, Linux, and Windows tabs, and replace the
unmaintained `exa` with `eza`. Generalize the bundling note to cover
both out-of-process backends, and document `sentry-wer.dll` and the
handler and database paths for the native backend.
Ref: getsentry/sentry-native#2044
Ref: getsentry/sentry-native#2175
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.
- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
supplied a deadline.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
_Make sure you've checked the following before merging your changes:_
- [ ] 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)
## LEGAL BOILERPLATE
<!-- Sentry employees and contractors can delete or ignore this section.
-->
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/attachments/index.mdx
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,13 @@ SDKs **MAY** attach a `view-hierarchy.json` file following the structure describ
153
153
For native SDKs (since 1.4.0), the path to the view hierarchy file **SHOULD** be configurable at SDK initialization. The SDK monitors the file and uploads it along with any event or crash:
`sentry_value_new_user_feedback` and `sentry_capture_user_feedback` are deprecated. They produce the older User Report envelope item, which doesn't carry scope data or attachments. Use `sentry_value_new_feedback` and `sentry_capture_feedback` instead.
The Native SDK currently supports **Windows**, **macOS**, and **Linux**. The Native SDK also acts as an **Android** NDK support library in downstream SDKs via the [Android SDK](/platforms/android/configuration/using-ndk/), but currently does not directly support the platform.
1
+
The Native SDK currently supports **Windows**, **macOS**, and **Linux**. The Native SDK also acts as an **Android** NDK support library in downstream SDKs via the [Android SDK](/platforms/android/configuration/using-ndk/), but currently does not directly support the platform.**Nintendo Switch**, **PlayStation**, and **Xbox** are supported via Sentry's console SDKs. See the [Nintendo Switch](/platforms/nintendo-switch/), [PlayStation](/platforms/playstation/), and [Xbox](/platforms/xbox/) documentation to get access.
2
2
3
3
To build the SDK, download the latest sources from the [Releases page](https://github.com/getsentry/sentry-native/releases). The SDK is managed as a [CMake] project, which additionally supports several configuration options, such as the backend to use.
4
4
5
-
For example, `CMake` can be used like this (on macOS):
5
+
For example, `CMake` can be used like this:
6
6
7
-
```shell
7
+
```shell {tabTitle:macOS} {mdExpandTabs}
8
8
# When using CMake 4 ensure you have valid SDKROOT defined in your environment.
# install the resulting artifacts into a specific prefix
18
17
cmake --install build --prefix install
19
-
# which will result in the following (on macOS):
20
-
exa --tree install --level 2
18
+
# which will result in the following:
19
+
eza --tree install --level 2
21
20
install
22
21
├── bin
23
-
│ └── crashpad_handler
22
+
│ └── sentry-crash
24
23
├── include
25
24
│ └── sentry.h
26
25
└── lib
27
26
├── cmake
28
27
├── libsentry.dylib
29
28
└── libsentry.dylib.dSYM
30
29
```
31
-
(For further details on the `SDKROOT` usage with CMake please consult the [macOS build section in the SDK README](https://github.com/getsentry/sentry-native?tab=readme-ov-file#building-and-installation))
32
30
33
-
Contrast the above with the build-steps for a typical `msbuild` project on Windows:
31
+
```shell {tabTitle:Linux}
32
+
# Configure the CMake build into the `build` directory with the desired backend.
33
+
# Specifying `RelWithDebInfo` as the `CMAKE_BUILD_TYPE` is optional because it
34
+
# is the default in sentry-native for all generators supporting it.
# which will result in the following output (ignoring non-essential lines):
47
65
tree /f install
48
66
├───bin
49
-
│ crashpad_handler.exe
50
-
│ crashpad_handler.pdb
67
+
│ sentry-crash.exe
68
+
│ sentry-wer.dll
69
+
│ sentry-wer.pdb
51
70
│ sentry.dll
52
71
│ sentry.pdb
53
72
│
@@ -56,12 +75,16 @@ tree /f install
56
75
│
57
76
└───lib
58
77
│ sentry.lib
78
+
│
79
+
└───cmake
59
80
```
60
81
82
+
(For further details on the `SDKROOT` usage with CMake please consult the [macOS build section in the SDK README](https://github.com/getsentry/sentry-native?tab=readme-ov-file#building-and-installation))
When using the _Crashpad backend_, which is the default on all supported Desktop platforms (Windows, Linux and macOS), the `crashpad_handler` binary has to be shipped alongside the application binary. See the [Crashpad documentation](/platforms/native/configuration/backends/crashpad/) for more information.
88
+
The out-of-process _Native_ and _Crashpad_ backends require shipping `sentry-crash` or `crashpad_handler`, respectively, alongside the application binary. See the [Native](/platforms/native/configuration/backends/native/) and [Crashpad](/platforms/native/configuration/backends/crashpad/) backend documentation for more information.
When using the _Crashpad backend_, which is the default on Windows and macOS, the `crashpad_handler` binary has to be shipped alongside the application binary. See the [Crashpad documentation](/platforms/native/configuration/backends/crashpad/) for more information.
48
+
The out-of-process _Native_ and _Crashpad_ backends require shipping `sentry-crash` or `crashpad_handler`, respectively, alongside the application binary. See the [Native](/platforms/native/configuration/backends/native/) and [Crashpad](/platforms/native/configuration/backends/crashpad/) backend documentation for more information.
Copy file name to clipboardExpand all lines: platform-includes/getting-started-primer/native.mdx
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,15 @@
1
1
The Sentry Native SDK is intended for C and C++. However, since it builds as a dynamic library and exposes C-bindings, it can be used by any language that supports interoperability with C, such as the Foreign Function Interface (FFI).
2
2
3
-
<Alert>
3
+
It also provides native crash reporting for other Sentry SDKs:
4
4
5
-
Using the `sentry-native` SDK in a standalone use case is currently an experimental feature. The SDK’s primary function is to fuel our other SDKs, like [`sentry-java`](https://github.com/getsentry/sentry-java) or [`sentry-unreal`](https://github.com/getsentry/sentry-unreal). Support from our side is best effort and we do what we can to respond to issues in a timely fashion, but please understand if we won’t be able to address your issues or feature suggestions.
Sentry's console SDKs also build on the Native SDK. See the [Nintendo Switch](/platforms/nintendo-switch/), [PlayStation](/platforms/playstation/), and [Xbox](/platforms/xbox/) documentation to get access.
8
13
9
14
Sentry also offers higher-level SDKs for platforms with built-in support for native crashes:
0 commit comments