Skip to content

Commit 8c5b443

Browse files
committed
updated the place
1 parent 26f69cd commit 8c5b443

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

docs/platforms/unity/configuration/error-capture.mdx renamed to docs/platforms/unity/usage/automatic-error-capture/index.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
2-
title: Error Capture
3-
sidebar_order: 60
4-
description: "Learn more about how to configure your SDK to automatically send events to Sentry."
2+
title: Automatic Error Capture
3+
sidebar_order: 10
4+
description: "Learn more about how the SDK automatically captures errors and sends them to Sentry."
55
---
66

7-
The Unity SDK relies on two integrations to capture errors: `UnityLogHandlerIntegration` and `UnityApplicationLoggingIntegration`. While they sound similar, they serve different purposes.
7+
The Sentry SDK for Unity provides both automatic and manual error capturing capabilities. This page focuses on the **automatic error capture** through Unity's logging system integrations. For information on manually capturing errors and messages, see the [Usage documentation](/platforms/unity/usage/).
8+
9+
## Automatic Error Capture
10+
11+
The Unity SDK relies on two integrations to automatically capture errors: `UnityLogHandlerIntegration` and `UnityApplicationLoggingIntegration`. While they sound similar, they serve different purposes.
812

913
## UnityLogHandlerIntegration
1014

@@ -14,11 +18,11 @@ The SDK uses the `UnityLogHandlerIntegration` to hook into Unity's logging syste
1418

1519
If [configured](https://docs.unity3d.com/6000.0/Documentation/Manual/stack-trace.html), Unity will include the stack traces with the log messages as raw strings. The SDK is able to parse and display this stack trace in the issues details.
1620

17-
If you're using Unity 6 or newer, you have the option to to enable the source code line numbers in the [player settings](https://docs.unity3d.com/6000.0/Documentation/Manual/il2cpp-managed-stack-traces.html). These line numbers are then part of the stringified stack trace and will be parsed by the SDK. Unfortunately, since there is no native exception at the time of logging, the SDK is not be able to provide line numbers.
21+
If you're using Unity 6 or newer, you have the option to to enable the source code line numbers in the [player settings](https://docs.unity3d.com/6000.0/Documentation/Manual/il2cpp-managed-stack-traces.html). These line numbers are then part of the stringified stack trace and will be parsed by the SDK. Unfortunately, since there is no native exception at the time of logging, the SDK is not be able to provide line numbers otherwise.
1822

19-
<Note>
23+
<Alert>
2024
If you're using a version older than Unity 6, the SDK is unable to provide line numbers for events captured through `Debug.LogError`. Line numbers are not part of the logging information provided by Unity.
21-
</Note>
25+
</Alert>
2226

2327
## UnityApplicationLoggingIntegration
2428

docs/platforms/unity/usage/index.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ Key terms:
1313
- An _event_ is one instance of sending data to Sentry. Generally, this data is an error or exception.
1414
- An _issue_ is a grouping of similar events.
1515
- The reporting of an event is called _capturing_.
16-
When an event is captured, its sent to Sentry.
16+
When an event is captured, it's sent to Sentry.
1717

1818
</Alert>
1919

20+
By default, the Sentry Unity SDK automatically captures errors through Unity's logging system. For details on this automatic error capture, see the [Automatic Error Capture documentation](/platforms/unity/usage/logging-integration/).
21+
22+
In addition to automatic capture, you can manually capture errors, exceptions, and messages as described below.
23+
2024
The most common form of capturing is to capture errors. What can be captured as an error varies by platform. In general, if you have something that looks like an exception, it can be captured. For some SDKs, you can also omit the argument to <PlatformIdentifier name="capture-exception" /> and Sentry will attempt to capture the current exception. It is also useful for manual reporting of errors or messages to Sentry.
2125

2226
While capturing an event, you can also record the breadcrumbs that lead up to that event. Breadcrumbs are different from events: they will not create an event in Sentry, but will be buffered until the next event is sent. Learn more about breadcrumbs in our <PlatformLink to="/enriching-events/breadcrumbs/">Breadcrumbs documentation</PlatformLink>.
@@ -32,3 +36,9 @@ Another common operation is to capture a bare message. A message is textual info
3236
Messages show up as issues on your issue stream, with the message as the issue name.
3337

3438
<PlatformContent includePath="capture-message" />
39+
40+
<Alert>
41+
42+
The Unity SDK does not provide stack traces for messages.
43+
44+
</Alert>

docs/platforms/unity/usage/set-level/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Set the Level
33
description: "The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event."
4-
sidebar_order: 5
4+
sidebar_order: 20
55
---
66

77
The level - similar to logging levels - is generally added by default based on the integration. You can also override it within an event.

0 commit comments

Comments
 (0)