Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ IncludeSources=True
AutomaticBreadcrumbsForLogs=(bOnFatalLog=True,bOnErrorLog=False,bOnWarningLog=False,bOnInfoLog=False,bOnDebugLog=False)
EnableTracing=True
TracesSampleRate=1.000000
Dsn="https://[email protected]/4509724070903808"
Dsn=

[/Script/MacTargetPlatform.MacTargetSettings]
-TargetedRHIs=SF_METAL_SM5
Expand Down
107 changes: 107 additions & 0 deletions Plugins/Sentry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,112 @@
# Changelog

## 1.1.1

### Features

- Add support for automatic event linking with spans/transactions ([#1075](https://github.com/getsentry/sentry-unreal/pull/1075))

### Dependencies

- Bump Cocoa SDK (iOS and Mac) from v8.55.0 to v8.55.1 ([#1068](https://github.com/getsentry/sentry-unreal/pull/1068))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8551)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.55.0...8.55.1)
- Bump Java SDK (Android) from v8.20.0 to v8.21.1 ([#1070](https://github.com/getsentry/sentry-unreal/pull/1070), [#1074](https://github.com/getsentry/sentry-unreal/pull/1074))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8211)
- [diff](https://github.com/getsentry/sentry-java/compare/8.20.0...8.21.1)
- Bump Android Gradle Plugin from v5.9.0 to v5.10.0 ([#1072](https://github.com/getsentry/sentry-unreal/pull/1072))
- [changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md#5100)
- [diff](https://github.com/getsentry/sentry-android-gradle-plugin/compare/5.9.0...5.10.0)

## 1.1.0

### Features

- Add GPU and device contexts for all platforms if valid ([#1067](https://github.com/getsentry/sentry-unreal/pull/1067))

### Fixes

- Packaging errors in Unreal Engine 5.4 and 5.5 caused by a missing `SWIFT_PACKAGE` define when targeting Mac and iOS ([#1063](https://github.com/getsentry/sentry-unreal/pull/1063))
- Crash when attaching game log file to captured event on Android ([#1066](https://github.com/getsentry/sentry-unreal/pull/1066))

### Dependencies

- Bump CLI from v2.52.0 to v2.53.0 ([#1062](https://github.com/getsentry/sentry-unreal/pull/1062))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2530)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.52.0...2.53.0)
- Bump Native SDK from v0.10.0 to v0.10.1 ([#1065](https://github.com/getsentry/sentry-unreal/pull/1065))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0101)
- [diff](https://github.com/getsentry/sentry-native/compare/0.10.0...0.10.1)

## 1.0.0

After several months of work we're finally shipping the Sentry SDK for Unreal Engine version 1.0.0.
If you are upgrading from a version `0.x`, **please refer to the [migration guide on our docs](https://docs.sentry.io/platforms/unreal/migration/)**.

This release also includes compatibility with plugin extensions for [PlayStation](https://docs.sentry.io/platforms/playstation/), [Xbox](https://docs.sentry.io/platforms/xbox/) and [Nintendo Switch](https://docs.sentry.io/platforms/nintendo-switch/).
Access to the source code of these console extensions require components that exist in private GitHub repositories. Invites are sent to licensed developers after a middleware verification. Please [follow the steps on our docs](https://docs.sentry.io/platforms/unreal/game-consoles/).

Note that [the diff from the latest experimental release 0.22.0 and this 1.0.0](https://github.com/getsentry/sentry-unreal/compare/0.22.0...1.0.0) release include several alpha and beta releases.
We have not combined all of them in this header but instead, left each incremental change in their own version below.

If you're migrating from 0.22.0 and want to read through all the changes, we recommend starting from [## 1.0.0-alpha.1](#100-alpha1) below.

In case you encounter any issues, please [create a ticket on our GitHub repository](https://github.com/getsentry/sentry-unreal/issues/new/choose).

### Breaking Changes

- User feedback API reworked:
- Feedback no longer needs to be associated with a specific event - the only required parameter is the user message
- `SentryUserFeedback` class replaced with `SentryFeedback`
- `CaptureUserFeedback` function in `SentrySubsystem` replaced with `CaptureFeedback`
- `CreateSentryUserFeedback` function in `SentryLibrary` replaced with `CreateSentryFeedback`
- On Windows and Linux, `ToString` function of `SentryId` class now returns the ID without dashes
- `StartTransactionWithContextAndOptions` function in `SentrySubsystem` now accepts `FSentryTransactionOptions` struct instead of string map
- `GetCustomSamplingContext` function in `SentrySamplingContext` now returns `TMap<FString, FSentryVariant>` instead of string map

### Features

- Add functionality to give/revoke user consent for crash uploads ([#1053](https://github.com/getsentry/sentry-unreal/pull/1053))
- Add new API for capturing user feedback ([#1051](https://github.com/getsentry/sentry-unreal/pull/1051))
- Add Traces sampling function support for Windows and Linux ([#1057](https://github.com/getsentry/sentry-unreal/pull/1057))
- Read `DSN`, `Environment` and `Release` options from environment variables ([#1054](https://github.com/getsentry/sentry-unreal/pull/1054))

### Dependencies

- Bump CLI from v2.51.1 to v2.52.0 ([#1049](https://github.com/getsentry/sentry-unreal/pull/1049))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2520)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.51.1...2.52.0)
- Bump Cocoa SDK (iOS and Mac) from v8.54.0 to v8.55.0 ([#1050](https://github.com/getsentry/sentry-unreal/pull/1050))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8550)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.54.0...8.55.0)
- Bump Java SDK (Android) from v8.19.1 to v8.20.0 ([#1056](https://github.com/getsentry/sentry-unreal/pull/1056))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8200)
- [diff](https://github.com/getsentry/sentry-java/compare/8.19.1...8.20.0)

## 1.0.0-beta.8

### Fixes

- No more build warnings in platform extensions caused by deprecated Native SDK API usages

### Dependencies

- Bump Java SDK (Android) from v8.17.0 to v8.19.1 ([#1031](https://github.com/getsentry/sentry-unreal/pull/1031), [#1042](https://github.com/getsentry/sentry-unreal/pull/1042), [#1046](https://github.com/getsentry/sentry-unreal/pull/1046))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8191)
- [diff](https://github.com/getsentry/sentry-java/compare/8.17.0...8.19.1)
- Bump Cocoa SDK (iOS and Mac) from v8.53.2 to v8.54.0 ([#1032](https://github.com/getsentry/sentry-unreal/pull/1032))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8540)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.53.2...8.54.0)
- Bump CLI from v2.50.2 to v2.51.1 ([#1037](https://github.com/getsentry/sentry-unreal/pull/1037), [#1041](https://github.com/getsentry/sentry-unreal/pull/1041))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2511)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.50.2...2.51.1)
- Bump Android Gradle Plugin from v5.8.0 to v5.9.0 ([#1036](https://github.com/getsentry/sentry-unreal/pull/1036), [#1045](https://github.com/getsentry/sentry-unreal/pull/1045))
- [changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md#590)
- [diff](https://github.com/getsentry/sentry-android-gradle-plugin/compare/5.8.0...5.9.0)
- Bump Native SDK from v0.9.1 to v0.10.0 ([#1040](https://github.com/getsentry/sentry-unreal/pull/1040))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0100)
- [diff](https://github.com/getsentry/sentry-native/compare/0.9.1...0.10.0)

## 1.0.0-beta.7

### Fixes
Expand Down
3 changes: 2 additions & 1 deletion Plugins/Sentry/Sentry.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"EngineVersion" : "5.6.0",
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0.0-beta.7",
"VersionName": "1.1.1",
"FriendlyName": "Sentry",
"Description": "Sentry catches all your errors and performance issues, and shows you how to fix them before they bring down the player experience.",
"Category": "Code Plugins",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Copyright (c) 2025 Sentry. All Rights Reserved.

#include "AndroidSentryFeedback.h"

#include "AndroidSentryId.h"

#include "Infrastructure/AndroidSentryJavaClasses.h"

FAndroidSentryFeedback::FAndroidSentryFeedback(const FString& message)
: FSentryJavaObjectWrapper(SentryJavaClasses::Feedback, "(Ljava/lang/String;)V",
*GetJString(message))
{
SetupClassMethods();
}

void FAndroidSentryFeedback::SetupClassMethods()
{
GetMessageMethod = GetMethod("getMessage", "()Ljava/lang/String;");
SetNameMethod = GetMethod("setName", "(Ljava/lang/String;)V");
GetNameMethod = GetMethod("getName", "()Ljava/lang/String;");
SetContactEmailMethod = GetMethod("setContactEmail", "(Ljava/lang/String;)V");
GetContactEmailMethod = GetMethod("getContactEmail", "()Ljava/lang/String;");
SetAssociatedEventMethod = GetMethod("setAssociatedEventId", "(Lio/sentry/protocol/SentryId;)V");
GetAssociatedEventMethod = GetMethod("getAssociatedEventId", "()Lio/sentry/protocol/SentryId;");
}

FString FAndroidSentryFeedback::GetMessage() const
{
return CallMethod<FString>(GetMessageMethod);
}

void FAndroidSentryFeedback::SetName(const FString& name)
{
CallMethod<void>(SetNameMethod, *GetJString(name));
}

FString FAndroidSentryFeedback::GetName() const
{
return CallMethod<FString>(GetNameMethod);
}

void FAndroidSentryFeedback::SetContactEmail(const FString& email)
{
CallMethod<void>(SetContactEmailMethod, *GetJString(email));
}

FString FAndroidSentryFeedback::GetContactEmail() const
{
return CallMethod<FString>(GetContactEmailMethod);
}

void FAndroidSentryFeedback::SetAssociatedEvent(const FString& eventId)
{
if (eventId.IsEmpty())
return;

TSharedPtr<FAndroidSentryId> idAndroid = MakeShareable(new FAndroidSentryId(eventId));
CallMethod<void>(SetAssociatedEventMethod, idAndroid->GetJObject());
}

FString FAndroidSentryFeedback::GetAssociatedEvent() const
{
auto idAndroid = CallObjectMethod<jobject>(GetAssociatedEventMethod);
if (!idAndroid)
{
return FString();
}

TSharedPtr<FAndroidSentryId> eventId = MakeShareable(new FAndroidSentryId(*idAndroid));
return eventId->ToString();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) 2025 Sentry. All Rights Reserved.

#pragma once

#include "Interface/SentryFeedbackInterface.h"

#include "Infrastructure/AndroidSentryJavaObjectWrapper.h"

class ISentryId;

class FAndroidSentryFeedback : public ISentryFeedback, public FSentryJavaObjectWrapper
{
public:
FAndroidSentryFeedback(const FString& message);

void SetupClassMethods();

virtual FString GetMessage() const override;
virtual void SetName(const FString& name) override;
virtual FString GetName() const override;
virtual void SetContactEmail(const FString& email) override;
virtual FString GetContactEmail() const override;
virtual void SetAssociatedEvent(const FString& eventId) override;
virtual FString GetAssociatedEvent() const override;

private:
FSentryJavaMethod GetMessageMethod;
FSentryJavaMethod SetNameMethod;
FSentryJavaMethod GetNameMethod;
FSentryJavaMethod SetContactEmailMethod;
FSentryJavaMethod GetContactEmailMethod;
FSentryJavaMethod SetAssociatedEventMethod;
FSentryJavaMethod GetAssociatedEventMethod;
};

typedef FAndroidSentryFeedback FPlatformSentryFeedback;
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ TSharedPtr<ISentryTransactionContext> FAndroidSentrySamplingContext::GetTransact
return MakeShareable(new FAndroidSentryTransactionContext(*transactionContext));
}

TMap<FString, FString> FAndroidSentrySamplingContext::GetCustomSamplingContext() const
TMap<FString, FSentryVariant> FAndroidSentrySamplingContext::GetCustomSamplingContext() const
{
auto customSamplingContext = CallObjectMethod<jobject>(GetCustomSamplingContextMethod);
if (!customSamplingContext)
return TMap<FString, FString>();
return TMap<FString, FSentryVariant>();

FSentryJavaObjectWrapper NativeCustomSamplingContext(SentryJavaClasses::CustomSamplingContext, *customSamplingContext);
FSentryJavaMethod GetDataMethod = NativeCustomSamplingContext.GetMethod("getData", "()Ljava/util/Map;");

auto data = NativeCustomSamplingContext.CallObjectMethod<jobject>(GetDataMethod);
return FAndroidSentryConverters::StringMapToUnreal(*data);
return FAndroidSentryConverters::VariantMapToUnreal(*data);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FAndroidSentrySamplingContext : public ISentrySamplingContext, public FSen
void SetupClassMethods();

virtual TSharedPtr<ISentryTransactionContext> GetTransactionContext() const override;
virtual TMap<FString, FString> GetCustomSamplingContext() const override;
virtual TMap<FString, FSentryVariant> GetCustomSamplingContext() const override;

private:
FSentryJavaMethod GetTransactionContextMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ void FAndroidSentrySpan::SetupClassMethods()
ToSentryTraceMethod = GetMethod("toSentryTrace", "()Lio/sentry/SentryTraceHeader;");
}

TSharedPtr<ISentrySpan> FAndroidSentrySpan::StartChild(const FString& operation, const FString& desctiption)
TSharedPtr<ISentrySpan> FAndroidSentrySpan::StartChild(const FString& operation, const FString& desctiption, bool bindToScope)
{
auto span = CallObjectMethod<jobject>(StartChildMethod, *GetJString(operation), *GetJString(desctiption));
return MakeShareable(new FAndroidSentrySpan(*span));
}

TSharedPtr<ISentrySpan> FAndroidSentrySpan::StartChildWithTimestamp(const FString& operation, const FString& desctiption, int64 timestamp)
TSharedPtr<ISentrySpan> FAndroidSentrySpan::StartChildWithTimestamp(const FString& operation, const FString& desctiption, int64 timestamp, bool bindToScope)
{
UE_LOG(LogSentrySdk, Log, TEXT("Starting child span with explicit timestamp not supported on Android."));
return StartChild(operation, desctiption);
return StartChild(operation, desctiption, bindToScope);
}

void FAndroidSentrySpan::Finish()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class FAndroidSentrySpan : public ISentrySpan, public FSentryJavaObjectWrapper

void SetupClassMethods();

virtual TSharedPtr<ISentrySpan> StartChild(const FString& operation, const FString& desctiption) override;
virtual TSharedPtr<ISentrySpan> StartChildWithTimestamp(const FString& operation, const FString& desctiption, int64 timestamp) override;
virtual TSharedPtr<ISentrySpan> StartChild(const FString& operation, const FString& desctiption, bool bindToScope) override;
virtual TSharedPtr<ISentrySpan> StartChildWithTimestamp(const FString& operation, const FString& desctiption, int64 timestamp, bool bindToScope) override;
virtual void Finish() override;
virtual void FinishWithTimestamp(int64 timestamp) override;
virtual bool IsFinished() const override;
Expand Down
Loading
Loading