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
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
Cleans up some small mistakes/inaccuracies/typos in the native 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+
## 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
added an urgent due date to it.
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)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Tightens Native docs accuracy, updates API examples (boolean usage and
sampler signature), adjusts logs minimum version, and cleans formatting.
>
> - **Native docs**:
> - **Options**: Clarify `release` sourcing (remove browser-specific
note); update `before-send` to return `sentry_value_new_null()`; link
`enable-logs` to `/platforms/native/logs`.
> - **Logs**: Lower minimum supported SDK to `0.11.1`; update C examples
to use `1` instead of `true`.
> - **Performance/Tracing**: Update `traces_sampler_callback` signature
to include `void *user_data` in examples.
> - **Breadcrumbs**: Tweak documented keys list (simplify `timestamp`
note).
> - **Signal handling**: Minor formatting/whitespace fixes and remove
stray code fence; tidy `SIGXFSZ` bullet.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
be80c5b. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Copy file name to clipboardExpand all lines: docs/platforms/native/advanced-usage/signal-handling/index.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This document provides guidance on signal handling in the Native SDK. If you'd l
12
12
* The [Signal (IPC) Wikipedia article](https://en.wikipedia.org/wiki/Signal_(IPC)) provides an overview of signals and describes many POSIX signals.
13
13
* The [glibc-docs](https://www.gnu.org/software/libc/manual/html_node/Signal-Handling.html) and [the man pages](https://man7.org/linux/man-pages/man7/signal.7.html) offer reference details for the signal vocabulary.
14
14
* If you want a book-length treatment, we recommend chapters 20-22 of Michael Kerrisk's [The Linux Programming Interface](https://man7.org/tlpi/).
15
-
15
+
16
16
## Signal Handling Conflicts
17
17
18
18
Sentry's Native SDK comes with its own set of signal handlers. There may be conflicts if your application currently installs handlers for any [signals of interest](#signals-of-interest) (listed below) that can result in a crash. To avoid this, do the following:
@@ -38,15 +38,15 @@ If you use the `crashpad` backend, in addition to the above, on Linux, you will
38
38
*`SIGSYS`: The kernel received a system call with an invalid argument.
39
39
*`SIGEMT`: An emulator trap occurred.
40
40
*`SIGXCPU`: The process exceeded a previously specified CPU [rlimit](https://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html).
41
-
*`SIGXFSZ`: Raised when a process grows a file beyond a maximum allowed size ([`RLIMIT_FSIZE`](https://man7.org/linux/man-pages/man2/getrlimit.2.html)).
41
+
*`SIGXFSZ`: Raised when a process grows a file beyond a maximum allowed size ([`RLIMIT_FSIZE`](https://man7.org/linux/man-pages/man2/getrlimit.2.html)).
42
42
43
43
## What to Consider When Writing `on_crash` Hooks
44
44
45
45
The callback that you register as an `on_crash` hook runs in the context of a signal handler. (`before_send` also runs in the context of a signal handler, unless you turned it off for crashes.)
46
46
47
-
Since signal handlers can interrupt the running process (and even each other) at any time, take special care when writing them.
47
+
Since signal handlers can interrupt the running process (and even each other) at any time, take special care when writing them.
48
48
49
-
Our developer documentation provides [guidelines for writing signal handlers](https://develop.sentry.dev/sdk/signal-handlers/). If you run on Linux or Android, these guidelines also apply to hooks. Signal handlers are notoriously difficult to work with, so it is crucial to follow these guidelines in order to avoid causing severe faults (like crashes and deadlocks), which can prevent terminating programs and sending reports.```
49
+
Our developer documentation provides [guidelines for writing signal handlers](https://develop.sentry.dev/sdk/signal-handlers/). If you run on Linux or Android, these guidelines also apply to hooks. Signal handlers are notoriously difficult to work with, so it is crucial to follow these guidelines in order to avoid causing severe faults (like crashes and deadlocks), which can prevent terminating programs and sending reports.
Copy file name to clipboardExpand all lines: docs/platforms/native/common/configuration/options.mdx
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,6 @@ Options that can be read from an environment variable (`SENTRY_DSN`, `SENTRY_ENV
14
14
15
15
The DSN tells the SDK where to send the events. If this value is not provided, the SDK will try to read it from the `SENTRY_DSN` environment variable. If that variable also does not exist, the SDK will just not send any events.
16
16
17
-
In runtimes without a process environment (such as the browser) that fallback does not apply.
18
-
19
17
Learn more about [DSN utilization](/product/sentry-basics/dsn-explainer/#dsn-utilization).
20
18
21
19
</ConfigKey>
@@ -34,9 +32,9 @@ Turns debug mode on or off. If `debug` is enabled, the SDK will attempt to print
34
32
35
33
<ConfigKeyname="release">
36
34
37
-
Sets the release. Some SDKs will try to automatically configure a release out of the box but it's a better idea to manually set it to guarantee that the release is in sync with your deploy integrations or source map uploads. Release names are strings, but some formats are detected by Sentry and might be rendered differently. Learn more about how to send release data so Sentry can tell you about regressions between releases and identify the potential source in [the releases documentation](/product/releases/) or the <SandboxLinkscenario="releases">sandbox</SandboxLink>.
35
+
Sets the release. Release names are strings, but some formats are detected by Sentry and might be rendered differently. Learn more about how to send release data so Sentry can tell you about regressions between releases and identify the potential source in [the releases documentation](/product/releases/) or the <SandboxLinkscenario="releases">sandbox</SandboxLink>.
38
36
39
-
By default the SDK will try to read this value from the `SENTRY_RELEASE` environment variable (in the browser SDK, this will be read off of the `window.SENTRY_RELEASE.id` if available).
37
+
By default the SDK will try to read this value from the `SENTRY_RELEASE` environment variable.
40
38
41
39
</ConfigKey>
42
40
@@ -72,7 +70,7 @@ These options can be used to hook the SDK in various ways to customize the repor
72
70
73
71
<ConfigKeyname="before-send">
74
72
75
-
This function is called with an SDK-specific message or error event object, and can return a modified event object, or `null` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
73
+
This function is called with an SDK-specific message or error event object, and can return a modified event object, or `sentry_value_new_null()` to skip reporting the event. This can be used, for instance, for manual PII stripping before sending.
76
74
77
75
By the time <PlatformIdentifiername="before-send" /> is executed, all scope data has already been applied to the event. Further modification of the scope won't have any effect.
78
76
@@ -108,7 +106,7 @@ A function responsible for determining the percentage chance a given transaction
108
106
109
107
<ConfigKeyname="enable-logs">
110
108
111
-
This option enables the logging integration, which allows the SDK to capture logs and send them to Sentry. This is disabled by default.
109
+
This option enables the [logging integration](/platforms/native/logs), which allows the SDK to capture logs and send them to Sentry. This is disabled by default.
The available breadcrumb keys are `type`, `category`, `message`, `level`, `timestamp` (which many SDKs will set automatically for you), and `data`, which is the place to put any additional information you'd like the breadcrumb to include. Using keys other than these six won't cause an error, but will result in the data being dropped when the event is processed by Sentry.
29
+
The available breadcrumb keys are `type`, `category`, `message`, `level`, `timestamp`, and `data`, which is the place to put any additional information you'd like the breadcrumb to include. Using keys other than these six won't cause an error, but will result in the data being dropped when the event is processed by Sentry.
Logs for Native are supported in Sentry Native SDK version `0.12.0` and above.
1
+
Logs for Native are supported in Sentry Native SDK version [0.11.1](https://github.com/getsentry/sentry-native/releases/tag/0.11.1) and above.
0 commit comments