Skip to content

Commit cf034f5

Browse files
authored
feat: Feature branch v4 (#2364)
1 parent 160a3d4 commit cf034f5

39 files changed

+1238
-685
lines changed

CHANGELOG.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
11
# Changelog
22

3-
## Unreleased
3+
## 4.0.0-beta.4
44

55
### Breaking Changes
66

77
- `sentry-native` is now built on Ubuntu 22.04 instead of Ubuntu 20.04, which reached EOL in May 2025. If you are running you game on a server on Ubuntu 20.04, you should update the OS before upgrading to this SDK version. ([#2355](https://github.com/getsentry/sentry-unity/pull/2355))
88

9+
#### Bump to Sentry SDK for .NET v6.0.0-preview introduces the following changes
10+
11+
- `BreadcrumbLevel.Critical` has been renamed to `BreadcrumbLevel.Fatal` for consistency with the other Sentry SDKs ([#4605](https://github.com/getsentry/sentry-dotnet/pull/4605))
12+
- Removed `SentrySdk.CaptureUserFeedback` and all associated members. Use the newer `SentrySdk.CaptureFeedback` instead. ([#4619](https://github.com/getsentry/sentry-dotnet/pull/4619))
13+
- ScopeExtensions.Populate is now internal ([#4611](https://github.com/getsentry/sentry-dotnet/pull/4611))
14+
- Backpressure handling is now enabled by default, meaning that the SDK will monitor system health and reduce the sampling rate of events and transactions when the system is under load. When the system is determined to be healthy again, the sampling rates are returned to their original levels. ([#4615](https://github.com/getsentry/sentry-dotnet/pull/4615))
15+
- Spans and Transactions now implement `IDisposable` so that they can be used with `using` statements/declarations that will automatically finish the span with a status of OK when it passes out of scope, if it has not already been finished, to be consistent with `Activity` classes when using OpenTelemetry ([#4627](https://github.com/getsentry/sentry-dotnet/pull/4627))
16+
- SpanTracer and TransactionTracer are still public but these are now `sealed` (see also [#4627](https://github.com/getsentry/sentry-dotnet/pull/4627))
17+
- CaptureFeedback now returns a `SentryId` and a `CaptureFeedbackResult` out parameter that indicate whether feedback was captured successfully and what the reason for failure was otherwise ([#4613](https://github.com/getsentry/sentry-dotnet/pull/4613))
18+
19+
### Behavioural Changes
20+
21+
- The SDK no longer refreshes the trace ID when the app loses and regains focus. This means that the trace ID persists from game start to game end. The SDK now also automatically adds breadcrumbs on those lifecycle events. ([#2374](https://github.com/getsentry/sentry-unity/pull/2374))
22+
23+
### Features
24+
25+
- The SDK no longer ends sessions as crashed when capturing unhandled or logged exceptions. Instead, sessions get correctly marked as `SessionEndStatus.Unhandled` ([#2376](https://github.com/getsentry/sentry-unity/pull/2376))
26+
- Added support for Structured Logging. The `SentrySdk.Logger` API is now exposed for Unity users, enabling structured log capture. The SDK can also automatically capture and send Debug logs based on the options configured. ([#2368](https://github.com/getsentry/sentry-unity/pull/2368))
27+
28+
### Fixes
29+
30+
- When configured, the SDK now no longer treats `Debug.LogError` events as exceptions but resports them as message events instead ([#2377](https://github.com/getsentry/sentry-unity/pull/2377))
931
### Fixes
1032

1133
- When targeting Xbox, the SDK now correctly picks up the debug symbols for sentry-native from the `Assets/Plugins/Sentry` directory ([#2363](https://github.com/getsentry/sentry-unity/pull/2363))
@@ -15,9 +37,9 @@
1537
- Bump CLI from v2.56.0 to v2.57.0 ([#2356](https://github.com/getsentry/sentry-unity/pull/2356), [#2369](https://github.com/getsentry/sentry-unity/pull/2369))
1638
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2570)
1739
- [diff](https://github.com/getsentry/sentry-cli/compare/2.56.0...2.57.0)
18-
- Bump .NET SDK from v5.16.0 to v5.16.2 ([#2359](https://github.com/getsentry/sentry-unity/pull/2359), [#2384](https://github.com/getsentry/sentry-unity/pull/2384))
19-
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#5162)
20-
- [diff](https://github.com/getsentry/sentry-dotnet/compare/5.16.0...5.16.2)
40+
- Bump .NET SDK from v5.16.0 to v6.0.0-preview.2 ([#2359](https://github.com/getsentry/sentry-unity/pull/2359), [#2384](https://github.com/getsentry/sentry-unity/pull/2384), [#2364](https://github.com/getsentry/sentry-unity/pull/2364))
41+
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#6000-preview.2)
42+
- [diff](https://github.com/getsentry/sentry-dotnet/compare/5.16.0...6.0.0-peview.2)
2143
- Bump Native SDK from v0.11.2 to v0.12.0 ([#2357](https://github.com/getsentry/sentry-unity/pull/2357), [#2378](https://github.com/getsentry/sentry-unity/pull/2378))
2244
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0120)
2345
- [diff](https://github.com/getsentry/sentry-native/compare/0.11.2...0.12.0)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>4.0.0-beta.3</Version>
3+
<Version>4.0.0-beta.4</Version>
44
<LangVersion>12</LangVersion>
55
<Nullable>enable</Nullable>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
2323
https://github.com/getsentry/unity.git
2424
```
2525

26-
To use this specific version of the SDK, append `#4.0.0-beta.3` to the URL, but note that this will stop Unity from suggesting version updates automatically.
26+
To use this specific version of the SDK, append `#4.0.0-beta.4` to the URL, but note that this will stop Unity from suggesting version updates automatically.
2727

2828
## Documentation
2929

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "9.0.304",
4-
"workloadVersion": "9.0.304",
3+
"version": "10.0.100-rc.2.25502.107",
4+
"workloadVersion": "10.0.100-rc.2.25513.4",
55
"rollForward": "disable",
66
"allowPrerelease": false
77
}

package/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
2222
https://github.com/getsentry/unity.git
2323
```
2424

25-
To use this specific version of the SDK, append `#4.0.0-beta.3` to the URL.
25+
To use this specific version of the SDK, append `#4.0.0-beta.4` to the URL.
2626

2727

2828
## Source code

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "io.sentry.unity",
3-
"version": "4.0.0-beta.3",
3+
"version": "4.0.0-beta.4",
44
"displayName": "Sentry Unity",
55
"description": "Sentry SDK for Unity",
66
"unity": "2019.4",

samples/unity-of-bugs/Assets/Resources/Sentry/SentryOptions.asset

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ MonoBehaviour:
3535
<MaxViewHierarchyRootObjects>k__BackingField: 100
3636
<MaxViewHierarchyObjectChildCount>k__BackingField: 20
3737
<MaxViewHierarchyDepth>k__BackingField: 10
38+
<EnableStructuredLogging>k__BackingField: 1
39+
<StructuredLogOnDebugLog>k__BackingField: 0
40+
<StructuredLogOnDebugLogWarning>k__BackingField: 1
41+
<StructuredLogOnDebugLogAssertion>k__BackingField: 1
42+
<StructuredLogOnDebugLogError>k__BackingField: 1
43+
<StructuredLogOnDebugLogException>k__BackingField: 1
44+
<AttachBreadcrumbsToEvents>k__BackingField: 0
3845
<BreadcrumbsForLogs>k__BackingField: 1
3946
<BreadcrumbsForWarnings>k__BackingField: 1
4047
<BreadcrumbsForAsserts>k__BackingField: 1
4148
<BreadcrumbsForErrors>k__BackingField: 1
42-
<BreadcrumbsForExceptions>k__BackingField: 1
4349
<CaptureLogErrorEvents>k__BackingField: 1
4450
<MaxBreadcrumbs>k__BackingField: 100
4551
<ReportAssembliesMode>k__BackingField: 1
@@ -51,7 +57,7 @@ MonoBehaviour:
5157
<SampleRate>k__BackingField: 1
5258
<ShutdownTimeout>k__BackingField: 2000
5359
<MaxQueueItems>k__BackingField: 30
54-
<AnrDetectionEnabled>k__BackingField: 1
60+
<AnrDetectionEnabled>k__BackingField: 0
5561
<AnrTimeout>k__BackingField: 5000
5662
<CaptureFailedRequests>k__BackingField: 1
5763
<FailedRequestStatusCodes>k__BackingField: f401000057020000

samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void LogError()
7171
// Error logs get captured as messages and do not have a stacktrace attached by default. This is an opt-in feature.
7272
// Note: That stack traces generated for message events are provided without line numbers. See known limitations
7373
// https://docs.sentry.io/platforms/unity/troubleshooting/known-limitations/#line-numbers-missing-in-events-captured-through-debuglogerror-or-sentrysdkcapturemessage
74-
Debug.LogError("Debug.LogError() called");
74+
Debug.LogError("This is a 'Debug.LogError()' message.");
7575
}
7676
}
7777

samples/unity-of-bugs/Assets/Scripts/ThreadingSamples.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void LogError()
8181
// Error logs get captured as messages and do not have a stacktrace attached by default. This is an opt-in feature.
8282
// Note: That stack traces generated for message events are provided without line numbers. See known limitations
8383
// https://docs.sentry.io/platforms/unity/troubleshooting/known-limitations/#line-numbers-missing-in-events-captured-through-debuglogerror-or-sentrysdkcapturemessage
84-
Debug.LogError("Debug.LogError() called");
84+
Debug.LogError("This is a 'Debug.LogError()' message.");
8585
}
8686
});
8787
}

scripts/smoke-test-webgl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def waitUntil(condition, interval=0.1, timeout=1):
203203
currentMessage += 1
204204
t.ExpectMessage(currentMessage, "'type':'event'")
205205
t.ExpectMessage(
206-
currentMessage, "'message':'crumb','type':'error','data':{'foo':'bar'},'category':'bread','level':'critical'}")
206+
currentMessage, "'message':'crumb','type':'error','data':{'foo':'bar'},'category':'bread','level':'fatal'}")
207207
t.ExpectMessage(currentMessage, "'message':'scope-crumb'}")
208208
t.ExpectMessage(currentMessage, "'extra':{'extra-key':42}")
209209
t.ExpectMessage(currentMessage, "'tag-key':'tag-value'")

0 commit comments

Comments
 (0)