Skip to content

Commit 66cae8b

Browse files
authored
Merge branch 'main' into destination-url
2 parents 5c525c9 + 5039ed6 commit 66cae8b

File tree

240 files changed

+1019
-784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+1019
-784
lines changed

.clang-format

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
AccessModifierOffset: -4
2+
AlignAfterOpenBracket: DontAlign
3+
AllowShortLambdasOnASingleLine: None
4+
LambdaBodyIndentation: OuterScope
5+
AllowAllParametersOfDeclarationOnNextLine: false
6+
AllowAllArgumentsOnNextLine: false
7+
BreakBeforeBraces: Allman
8+
BreakConstructorInitializersBeforeComma: true
9+
BreakStringLiterals: false
10+
ColumnLimit: 0
11+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
12+
IncludeCategories:
13+
- Regex: '.*\.generated\.h'
14+
Priority: 100
15+
- Regex: '.*(PCH).*'
16+
Priority: -1
17+
- Regex: '".*"'
18+
Priority: 1
19+
- Regex: '^<.*\.(h)>'
20+
Priority: 3
21+
- Regex: '^<.*>'
22+
Priority: 4
23+
IndentWidth: 4
24+
ObjCBlockIndentWidth: 4
25+
ObjCBreakBeforeNestedBlockParam: false
26+
PointerAlignment: Left
27+
SpacesInContainerLiterals: true
28+
SpaceAfterTemplateKeyword: false
29+
Standard: c++11
30+
TabWidth: 4
31+
UseTab: Always
32+
MacroBlockBegin: '^BEGIN_DEFINE_SPEC'
33+
MacroBlockEnd: '^END_DEFINE_SPEC'
34+
Cpp11BracedListStyle: false

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: package-plugin-workflow
22

3-
on:
3+
on:
44
push:
5+
branches:
6+
- main
7+
- release/*
8+
pull_request:
59
paths-ignore:
610
- "**.md"
711

@@ -29,12 +33,14 @@ jobs:
2933
with:
3034
target: Linux
3135
runsOn: ubuntu-22.04
36+
container: ubuntu:20.04
3237

3338
linux-arm64-sdk:
3439
uses: ./.github/workflows/sdk-build.yml
3540
with:
3641
target: LinuxArm64
3742
runsOn: ubuntu-22.04-arm
43+
container: arm64v8/ubuntu:20.04
3844

3945
windows-crashpad-sdk:
4046
uses: ./.github/workflows/sdk-build.yml

.github/workflows/lint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Lint"
2+
on:
3+
push:
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
submodules: recursive
14+
15+
- name: Clang Format
16+
run: find plugin-dev/Source/Sentry plugin-dev/Source/SentryEditor -name '*.h' -o -name '*.cpp' | xargs /usr/bin/clang-format --dry-run --Werror

.github/workflows/sdk-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ jobs:
2121
run:
2222
shell: bash
2323
steps:
24+
- name: Configure env for Linux docker containers
25+
if: ${{ inputs.target == 'Linux' || inputs.target == 'LinuxArm64' }}
26+
run: |
27+
apt-get update
28+
apt-get -y install sudo
29+
apt-get -y install wget
30+
apt-get -y install cmake
31+
apt-get -y install software-properties-common
32+
apt-get -y install git
33+
git config --global --add safe.directory $(pwd)
34+
2435
- uses: actions/checkout@v4
2536

2637
- name: Select submodule

CHANGELOG.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,38 @@
22

33
## Unreleased
44

5+
### Features
6+
7+
- Add API allowing to get/set event fingerprint ([#920](https://github.com/getsentry/sentry-unreal/pull/920))
58
- Add destination URL for crash envelope ([#905](https://github.com/getsentry/sentry-unreal/pull/905))
69

10+
### Dependencies
11+
12+
- Bump Java SDK (Android) from v8.11.1 to v8.12.0 ([#911](https://github.com/getsentry/sentry-unreal/pull/911))
13+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8120)
14+
- [diff](https://github.com/getsentry/sentry-java/compare/8.11.1...8.12.0)
15+
- Bump Native SDK from v0.8.4 to v0.8.5 ([#912](https://github.com/getsentry/sentry-unreal/pull/912))
16+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#085)
17+
- [diff](https://github.com/getsentry/sentry-native/compare/0.8.4...0.8.5)
18+
- Bump Cocoa SDK (iOS and Mac) from v8.50.1 to v8.51.1 ([#913](https://github.com/getsentry/sentry-unreal/pull/913), [#916](https://github.com/getsentry/sentry-unreal/pull/916), [#925](https://github.com/getsentry/sentry-unreal/pull/925))
19+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8511)
20+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.50.1...8.51.1)
21+
22+
## 1.0.0-beta.1
23+
724
### Fixes
825

26+
- The image buffer is now allocated on the heap to prevent stack overflow during screenshot capture on Windows ([#900](https://github.com/getsentry/sentry-unreal/pull/900))
927
- Windows default crash handling mechanism is no longer disabled if SDK initialization failed ([#901](https://github.com/getsentry/sentry-unreal/pull/901))
1028

1129
### Dependencies
1230

13-
- Bump CLI from v2.43.1 to v2.44.0 ([#896](https://github.com/getsentry/sentry-unreal/pull/896))
14-
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2440)
15-
- [diff](https://github.com/getsentry/sentry-cli/compare/2.43.1...2.44.0)
16-
- Bump Cocoa SDK (iOS and Mac) from v8.49.2 to v8.50.0 ([#897](https://github.com/getsentry/sentry-unreal/pull/897))
17-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8500)
18-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.2...8.50.0)
31+
- Bump CLI from v2.43.1 to v2.45.0 ([#896](https://github.com/getsentry/sentry-unreal/pull/896), [#906](https://github.com/getsentry/sentry-unreal/pull/906))
32+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2450)
33+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.43.1...2.45.0)
34+
- Bump Cocoa SDK (iOS and Mac) from v8.49.2 to v8.50.1 ([#897](https://github.com/getsentry/sentry-unreal/pull/897), [#907](https://github.com/getsentry/sentry-unreal/pull/907))
35+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8501)
36+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.49.2...8.50.1)
1937

2038
## 1.0.0-alpha.6
2139

CONTRIBUTING.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ For big feature it's advised to raise an issue to discuss it first.
55

66
## Getting started
77

8-
### Dependencies
8+
### Prerequisites
99

1010
- [GitHub CLI](https://cli.github.com/)
1111

@@ -22,6 +22,8 @@ To be able to build for Android, make sure to configure the SDK & NDK according
2222

2323
> Currently this method is available only for C++ UE projects! Blueprint project can be converted to a C++ one simply by adding an empty class via Editor.
2424
25+
> When working with a `sentry-unreal` fork, run `gh repo set-default` to select the default remote repository used for GitHub API queries (required for pulling plugin dependencies from CI). If you don't plan to configure the CI pipeline for your fork, it's recommended to set `getsentry/sentry-unreal` as the default remote.
26+
2527
To get started, we recommend running the init script:
2628

2729
* `./scripts/init.sh` on macOS/Linux
@@ -45,3 +47,21 @@ In order to run automation tests navigate to `Settings -> Plugins -> Testing` an
4547
There is a demo level (`SentryDemo.umap`) in project's Content folder which presents a simple UI allowing to send some test events to Sentry. `W_SentryDemo` blueprint implementation shows how to call the plugin API and can be used as a reference.
4648

4749
In order to run the demo level navigate to `Content Browser -> Content -> Maps` and open `SentryDemo` map. Hit play to launch the demo.
50+
51+
## Modifying plugin content
52+
53+
All files that belong to the plugin are listed in the snapshot files:
54+
55+
- `/scripts/packaging/package-github.snapshot` (for the GitHub package)
56+
- `/scripts/packaging/package-marketplace.snapshot` (for the Marketplace package)
57+
58+
If you add, delete or move files within the `plugin-dev` directory these snapshot files must be updated to reflect the changes. To do that, run:
59+
60+
```bash
61+
pwsh ./scripts/packaging/pack.ps1
62+
pwsh ./scripts/packaging/test-contents.ps1 accept
63+
```
64+
65+
Once completed, make sure to commit the updated snapshot files to Git.
66+
67+
CI will run a separate check to compare the actual plugin package contents against the snapshot files.

modules/sentry-cocoa.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=8.50.0
1+
version=8.51.1
22
repo=https://github.com/getsentry/sentry-cocoa

modules/sentry-java

Submodule sentry-java updated 124 files

modules/sentry-native

Submodule sentry-native updated 59 files

plugin-dev/Scripts/upload-debug-symbols-win.bat

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,7 @@ if not "%EnabledConfigurations%"=="" (
7272
)
7373
)
7474

75-
if "%TargetPlatform%"=="Win64" (
76-
set CliExec=%PluginPath:"=%\Source\ThirdParty\CLI\sentry-cli-Windows-x86_64.exe
77-
) else if "%TargetPlatform%"=="Linux" (
78-
set CliExec=%PluginPath:"=%\Source\ThirdParty\CLI\sentry-cli-Windows-x86_64.exe
79-
) else if "%TargetPlatform%"=="LinuxArm64" (
80-
set CliExec=%PluginPath:"=%\Source\ThirdParty\CLI\sentry-cli-Windows-x86_64.exe
81-
) else (
82-
echo Warning: Sentry: Unexpected platform %TargetPlatform%. Skipping...
83-
exit /B 0
84-
)
75+
set CliExec=%PluginPath:"=%\Source\ThirdParty\CLI\sentry-cli-Windows-x86_64.exe
8576

8677
if not exist "%CliExec%" (
8778
echo Error: Sentry: Sentry CLI is missing. Skipping...

plugin-dev/Sentry.uplugin

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "1.0.0-alpha.6",
4+
"VersionName": "1.0.0-beta.1",
55
"FriendlyName": "Sentry",
66
"Description": "Sentry catches all your errors and performance issues, and shows you how to fix them before they bring down the player experience.",
77
"Category": "Code Plugins",
@@ -31,7 +31,6 @@
3131
"PostBuildSteps":
3232
{
3333
"Mac": [
34-
"if [ $(TargetPlatform) = \"Mac\" ] && [ ! -f \"$(PluginDir)/Binaries/Mac/sentry.dylib\" ]; then\n cp \"$(PluginDir)/Source/ThirdParty/Mac/bin/sentry.dylib\" \"$(PluginDir)/Binaries/Mac/sentry.dylib\"\nfi",
3534
"if [ -f \"$(PluginDir)/Scripts/upload-debug-symbols.sh\" ]; then\n \"$(PluginDir)/Scripts/upload-debug-symbols.sh\" $(TargetPlatform) $(TargetName) $(TargetType) $(TargetConfiguration) \"$(ProjectDir)\" \"$(PluginDir)\"\nelse\n echo \"Sentry: Symbol upload script is missing. Skipping post build step.\"\nfi"
3635
],
3736
"Linux": [

plugin-dev/Source/Sentry/Private/Android/AndroidSentryAttachment.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryAttachment.h"
44

@@ -7,14 +7,14 @@
77

88
FAndroidSentryAttachment::FAndroidSentryAttachment(const TArray<uint8>& data, const FString& filename, const FString& contentType)
99
: FSentryJavaObjectWrapper(SentryJavaClasses::Attachment, "([BLjava/lang/String;Ljava/lang/String;)V",
10-
FAndroidSentryConverters::ByteArrayToNative(data), *GetJString(filename), *GetJString(contentType))
10+
FAndroidSentryConverters::ByteArrayToNative(data), *GetJString(filename), *GetJString(contentType))
1111
{
1212
SetupClassMethods();
1313
}
1414

1515
FAndroidSentryAttachment::FAndroidSentryAttachment(const FString& path, const FString& filename, const FString& contentType)
1616
: FSentryJavaObjectWrapper(SentryJavaClasses::Attachment, "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V",
17-
*GetJString(path), *GetJString(filename), *GetJString(contentType))
17+
*GetJString(path), *GetJString(filename), *GetJString(contentType))
1818
{
1919
SetupClassMethods();
2020
}

plugin-dev/Source/Sentry/Private/Android/AndroidSentryAttachment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryBreadcrumb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryBreadcrumb.h"
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryBreadcrumb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryEvent.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryEvent.h"
44
#include "AndroidSentryId.h"
@@ -26,6 +26,8 @@ void FAndroidSentryEvent::SetupClassMethods()
2626
GetMessageMethod = GetMethod("getMessage", "()Lio/sentry/protocol/Message;");
2727
SetLevelMethod = GetMethod("setLevel", "(Lio/sentry/SentryLevel;)V");
2828
GetLevelMethod = GetMethod("getLevel", "()Lio/sentry/SentryLevel;");
29+
SetFingerprintMethod = GetMethod("setFingerprints", "(Ljava/util/List;)V");
30+
GetFingerprintMethod = GetMethod("getFingerprints()", "()Ljava/util/List;");
2931
IsCrashMethod = GetMethod("isCrashed", "()Z");
3032
}
3133

@@ -57,6 +59,17 @@ ESentryLevel FAndroidSentryEvent::GetLevel() const
5759
return FAndroidSentryConverters::SentryLevelToUnreal(*level);
5860
}
5961

62+
void FAndroidSentryEvent::SetFingerprint(const TArray<FString>& fingerprint)
63+
{
64+
CallMethod<void>(SetFingerprintMethod, FAndroidSentryConverters::StringArrayToNative(fingerprint)->GetJObject());
65+
}
66+
67+
TArray<FString> FAndroidSentryEvent::GetFingerprint()
68+
{
69+
auto fingerprint = CallObjectMethod<jobject>(GetFingerprintMethod);
70+
return FAndroidSentryConverters::StringListToUnreal(*fingerprint);
71+
}
72+
6073
bool FAndroidSentryEvent::IsCrash() const
6174
{
6275
return CallMethod<bool>(IsCrashMethod);

plugin-dev/Source/Sentry/Private/Android/AndroidSentryEvent.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

@@ -19,6 +19,8 @@ class FAndroidSentryEvent : public ISentryEvent, public FSentryJavaObjectWrapper
1919
virtual FString GetMessage() const override;
2020
virtual void SetLevel(ESentryLevel level) override;
2121
virtual ESentryLevel GetLevel() const override;
22+
virtual void SetFingerprint(const TArray<FString>& fingerprint) override;
23+
virtual TArray<FString> GetFingerprint() override;
2224
virtual bool IsCrash() const override;
2325
virtual bool IsAnr() const override;
2426

@@ -28,6 +30,8 @@ class FAndroidSentryEvent : public ISentryEvent, public FSentryJavaObjectWrapper
2830
FSentryJavaMethod GetMessageMethod;
2931
FSentryJavaMethod SetLevelMethod;
3032
FSentryJavaMethod GetLevelMethod;
33+
FSentryJavaMethod SetFingerprintMethod;
34+
FSentryJavaMethod GetFingerprintMethod;
3135
FSentryJavaMethod IsCrashMethod;
3236
};
3337

plugin-dev/Source/Sentry/Private/Android/AndroidSentryHint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2023 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryHint.h"
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryHint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2023 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryId.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryId.h"
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryId.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryMessage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentryMessage.h"
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentryMessage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

plugin-dev/Source/Sentry/Private/Android/AndroidSentrySamplingContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2024 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#include "AndroidSentrySamplingContext.h"
44
#include "AndroidSentryTransactionContext.h"
@@ -27,7 +27,7 @@ TSharedPtr<ISentryTransactionContext> FAndroidSentrySamplingContext::GetTransact
2727
TMap<FString, FString> FAndroidSentrySamplingContext::GetCustomSamplingContext() const
2828
{
2929
auto customSamplingContext = CallObjectMethod<jobject>(GetCustomSamplingContextMethod);
30-
if(!customSamplingContext)
30+
if (!customSamplingContext)
3131
return TMap<FString, FString>();
3232

3333
FSentryJavaObjectWrapper NativeCustomSamplingContext(SentryJavaClasses::CustomSamplingContext, *customSamplingContext);

plugin-dev/Source/Sentry/Private/Android/AndroidSentrySamplingContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2024 Sentry. All Rights Reserved.
1+
// Copyright (c) 2025 Sentry. All Rights Reserved.
22

33
#pragma once
44

0 commit comments

Comments
 (0)