Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# Changelog

## Unreleased
## 4.0.0-beta.4

### Breaking Changes

- `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))

#### Bump to Sentry SDK for .NET v6.0.0-preview introduces the following changes

- `BreadcrumbLevel.Critical` has been renamed to `BreadcrumbLevel.Fatal` for consistency with the other Sentry SDKs ([#4605](https://github.com/getsentry/sentry-dotnet/pull/4605))
- Removed `SentrySdk.CaptureUserFeedback` and all associated members. Use the newer `SentrySdk.CaptureFeedback` instead. ([#4619](https://github.com/getsentry/sentry-dotnet/pull/4619))
- ScopeExtensions.Populate is now internal ([#4611](https://github.com/getsentry/sentry-dotnet/pull/4611))
- 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))
- 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))
- SpanTracer and TransactionTracer are still public but these are now `sealed` (see also [#4627](https://github.com/getsentry/sentry-dotnet/pull/4627))
- 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))

### Behavioural Changes

- 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))

### Features

- 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))
- 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))

### Fixes

- 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))
### Fixes

- 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))
Expand All @@ -15,9 +37,9 @@
- 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))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2570)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.56.0...2.57.0)
- 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))
- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#5162)
- [diff](https://github.com/getsentry/sentry-dotnet/compare/5.16.0...5.16.2)
- 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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 🚫 The changelog entry seems to be part of an already released section ## 4.0.0.
    Consider moving the entry to the ## Unreleased section, please.

- [changelog](https://github.com/getsentry/sentry-dotnet/blob/main/CHANGELOG.md#6000-preview.2)
- [diff](https://github.com/getsentry/sentry-dotnet/compare/5.16.0...6.0.0-peview.2)
- 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))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0120)
- [diff](https://github.com/getsentry/sentry-native/compare/0.11.2...0.12.0)
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>4.0.0-beta.3</Version>
<Version>4.0.0-beta.4</Version>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
https://github.com/getsentry/unity.git
```

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.
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.

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "9.0.304",
"workloadVersion": "9.0.304",
"version": "10.0.100-rc.2.25502.107",
"workloadVersion": "10.0.100-rc.2.25513.4",
"rollForward": "disable",
"allowPrerelease": false
}
Expand Down
2 changes: 1 addition & 1 deletion package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Install the package via the Unity Package Manager using a Git URL to Sentry's SD
https://github.com/getsentry/unity.git
```

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


## Source code
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "io.sentry.unity",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"displayName": "Sentry Unity",
"description": "Sentry SDK for Unity",
"unity": "2019.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ MonoBehaviour:
<MaxViewHierarchyRootObjects>k__BackingField: 100
<MaxViewHierarchyObjectChildCount>k__BackingField: 20
<MaxViewHierarchyDepth>k__BackingField: 10
<EnableStructuredLogging>k__BackingField: 1
<StructuredLogOnDebugLog>k__BackingField: 0
<StructuredLogOnDebugLogWarning>k__BackingField: 1
<StructuredLogOnDebugLogAssertion>k__BackingField: 1
<StructuredLogOnDebugLogError>k__BackingField: 1
<StructuredLogOnDebugLogException>k__BackingField: 1
<AttachBreadcrumbsToEvents>k__BackingField: 0
<BreadcrumbsForLogs>k__BackingField: 1
<BreadcrumbsForWarnings>k__BackingField: 1
<BreadcrumbsForAsserts>k__BackingField: 1
<BreadcrumbsForErrors>k__BackingField: 1
<BreadcrumbsForExceptions>k__BackingField: 1
<CaptureLogErrorEvents>k__BackingField: 1
<MaxBreadcrumbs>k__BackingField: 100
<ReportAssembliesMode>k__BackingField: 1
Expand All @@ -51,7 +57,7 @@ MonoBehaviour:
<SampleRate>k__BackingField: 1
<ShutdownTimeout>k__BackingField: 2000
<MaxQueueItems>k__BackingField: 30
<AnrDetectionEnabled>k__BackingField: 1
<AnrDetectionEnabled>k__BackingField: 0
<AnrTimeout>k__BackingField: 5000
<CaptureFailedRequests>k__BackingField: 1
<FailedRequestStatusCodes>k__BackingField: f401000057020000
Expand Down
2 changes: 1 addition & 1 deletion samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void LogError()
// Error logs get captured as messages and do not have a stacktrace attached by default. This is an opt-in feature.
// Note: That stack traces generated for message events are provided without line numbers. See known limitations
// https://docs.sentry.io/platforms/unity/troubleshooting/known-limitations/#line-numbers-missing-in-events-captured-through-debuglogerror-or-sentrysdkcapturemessage
Debug.LogError("Debug.LogError() called");
Debug.LogError("This is a 'Debug.LogError()' message.");
}
}

Expand Down
2 changes: 1 addition & 1 deletion samples/unity-of-bugs/Assets/Scripts/ThreadingSamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void LogError()
// Error logs get captured as messages and do not have a stacktrace attached by default. This is an opt-in feature.
// Note: That stack traces generated for message events are provided without line numbers. See known limitations
// https://docs.sentry.io/platforms/unity/troubleshooting/known-limitations/#line-numbers-missing-in-events-captured-through-debuglogerror-or-sentrysdkcapturemessage
Debug.LogError("Debug.LogError() called");
Debug.LogError("This is a 'Debug.LogError()' message.");
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/smoke-test-webgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def waitUntil(condition, interval=0.1, timeout=1):
currentMessage += 1
t.ExpectMessage(currentMessage, "'type':'event'")
t.ExpectMessage(
currentMessage, "'message':'crumb','type':'error','data':{'foo':'bar'},'category':'bread','level':'critical'}")
currentMessage, "'message':'crumb','type':'error','data':{'foo':'bar'},'category':'bread','level':'fatal'}")
t.ExpectMessage(currentMessage, "'message':'scope-crumb'}")
t.ExpectMessage(currentMessage, "'extra':{'extra-key':42}")
t.ExpectMessage(currentMessage, "'tag-key':'tag-value'")
Expand Down
2 changes: 1 addition & 1 deletion src/Sentry.Unity.Android/BreadcrumbExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static AndroidJavaObject ToJavaSentryLevel(this BreadcrumbLevel level)
using var javaSentryLevel = new AndroidJavaClass("io.sentry.SentryLevel");
return level switch
{
BreadcrumbLevel.Critical => javaSentryLevel.GetStatic<AndroidJavaObject>("FATAL"),
BreadcrumbLevel.Fatal => javaSentryLevel.GetStatic<AndroidJavaObject>("FATAL"),
BreadcrumbLevel.Error => javaSentryLevel.GetStatic<AndroidJavaObject>("ERROR"),
BreadcrumbLevel.Warning => javaSentryLevel.GetStatic<AndroidJavaObject>("WARNING"),
BreadcrumbLevel.Debug => javaSentryLevel.GetStatic<AndroidJavaObject>("DEBUG"),
Expand Down
Loading
Loading