Skip to content

Commit

Permalink
Merge branch 'main' into feat/performance-monitoring
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
tustanivsky committed Jan 16, 2024
2 parents 60af3e3 + 10955d6 commit 418d981
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 5 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features

- Add performance monitoring API ([#470](https://github.com/getsentry/sentry-unreal/pull/470))
- Add `IsCrashedLastRun` allowing to check whether the app crashed during its last run ([#483](https://github.com/getsentry/sentry-unreal/pull/483))

### Fixes

Expand All @@ -18,6 +19,18 @@
- Bump Java SDK (Android) from v7.0.0 to v7.1.0 ([#469](https://github.com/getsentry/sentry-unreal/pull/469))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#710)
- [diff](https://github.com/getsentry/sentry-java/compare/7.0.0...7.1.0)
- Bump CLI from v2.23.0 to v2.25.0 ([#471](https://github.com/getsentry/sentry-unreal/pull/471), [#472](https://github.com/getsentry/sentry-unreal/pull/472), [#475](https://github.com/getsentry/sentry-unreal/pull/475), [#477](https://github.com/getsentry/sentry-unreal/pull/477))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2250)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.23.0...2.25.0)
- Bump Cocoa SDK (iOS) from v8.17.2 to v8.18.0 ([#474](https://github.com/getsentry/sentry-unreal/pull/474))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8180)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.17.2...8.18.0)
- Bump Native SDK from v0.6.7 to v0.7.0 ([#478](https://github.com/getsentry/sentry-unreal/pull/478))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#070)
- [diff](https://github.com/getsentry/sentry-native/compare/0.6.7...0.7.0)
- Bump Java SDK (Android) from v7.1.0 to v7.2.0 ([#481](https://github.com/getsentry/sentry-unreal/pull/481))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#720)
- [diff](https://github.com/getsentry/sentry-java/compare/7.1.0...7.2.0)

## 0.15.1

Expand Down
2 changes: 1 addition & 1 deletion modules/sentry-cocoa
Submodule sentry-cocoa updated 85 files
+7 −2 .github/workflows/benchmarking.yml
+8 −3 .github/workflows/build.yml
+5 −0 .github/workflows/codeql-analysis.yml
+5 −0 .github/workflows/lint.yml
+7 −2 .github/workflows/saucelabs-UI-tests.yml
+16 −11 .github/workflows/test.yml
+1 −1 .github/workflows/testflight.yml
+22 −1 CHANGELOG.md
+10 −10 Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj
+1 −0 Samples/iOS-Swift/iOS-Swift/AppDelegate.swift
+3 −3 Samples/iOS-Swift/iOS-Swift/Base.lproj/Main.storyboard
+1 −1 Samples/iOS-Swift/iOS-Swift/TransactionsViewController.swift
+4 −1 Samples/iOS-Swift/iOS-Swift/ViewControllers/LoremIpsumViewController.swift
+7 −10 Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift
+2 −2 Sentry.podspec
+20 −0 Sentry.xcodeproj/project.pbxproj
+1 −1 SentryPrivate.podspec
+2 −2 SentrySwiftUI.podspec
+2 −1 SentryTestUtils/TestCurrentDateProvider.swift
+16 −9 SentryTestUtils/TestDisplayLinkWrapper.swift
+1 −1 Sources/Configuration/Sentry.xcconfig
+1 −1 Sources/Configuration/SentryPrivate.xcconfig
+3 −3 Sources/Sentry/PrivateSentrySDKOnly.mm
+2 −0 Sources/Sentry/Public/SentryCrashExceptionApplication.h
+14 −2 Sources/Sentry/Public/SentryOptions.h
+1 −1 Sources/Sentry/Public/SentryScope.h
+3 −21 Sources/Sentry/SentryAppStartMeasurement.m
+36 −9 Sources/Sentry/SentryAppStartTracker.m
+3 −1 Sources/Sentry/SentryAppStartTrackingIntegration.m
+10 −4 Sources/Sentry/SentryBuildAppStartSpans.m
+25 −0 Sources/Sentry/SentryDelayedFrame.m
+208 −0 Sources/Sentry/SentryDelayedFramesTracker.m
+4 −1 Sources/Sentry/SentryDependencyContainer.m
+7 −5 Sources/Sentry/SentryFileManager.m
+66 −12 Sources/Sentry/SentryFramesTracker.m
+1 −1 Sources/Sentry/SentryMeta.m
+4 −0 Sources/Sentry/SentryOptions.m
+21 −0 Sources/Sentry/SentrySDK.m
+64 −1 Sources/Sentry/SentrySpan.m
+9 −5 Sources/Sentry/SentrySystemEventBreadcrumbs.m
+8 −2 Sources/Sentry/SentryTime.mm
+43 −43 Sources/Sentry/SentryTimeToDisplayTracker.m
+80 −48 Sources/Sentry/SentryTracer.m
+1 −5 Sources/Sentry/SentryUIEventTrackerTransactionMode.m
+2 −5 Sources/Sentry/SentryUIEventTrackingIntegration.m
+1 −1 Sources/Sentry/SentryUIViewControllerPerformanceTracker.m
+3 −3 Sources/Sentry/include/HybridPublic/PrivateSentrySDKOnly.h
+8 −13 Sources/Sentry/include/HybridPublic/SentryAppStartMeasurement.h
+4 −1 Sources/Sentry/include/SentryAppStartTracker.h
+22 −0 Sources/Sentry/include/SentryDelayedFrame.h
+63 −0 Sources/Sentry/include/SentryDelayedFramesTracker.h
+15 −2 Sources/Sentry/include/SentryFramesTracker.h
+1 −0 Sources/Sentry/include/SentrySDK+Private.h
+1 −0 Sources/Sentry/include/SentryScope+Private.h
+15 −2 Sources/Sentry/include/SentrySpan.h
+3 −0 Sources/Sentry/include/SentryTime.h
+1 −1 Sources/Sentry/include/SentryTimeToDisplayTracker.h
+2 −0 Sources/Sentry/include/SentryTracer.h
+0 −5 Sources/Sentry/include/SentryTracerConfiguration.h
+1 −4 Sources/Sentry/include/SentryUIEventTrackerTransactionMode.h
+1 −1 Tests/HybridSDKTest/HybridPod.podspec
+4 −3 Tests/SentryProfilerTests/SentryProfilerSwiftTests.swift
+21 −0 Tests/SentryTests/Helper/SentryTimeSwiftTests.swift
+15 −0 Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift
+49 −8 Tests/SentryTests/Integrations/Performance/AppStartTracking/SentryAppStartTrackerTests.swift
+13 −0 Tests/SentryTests/Integrations/Performance/AppStartTracking/SentryAppStartTrackingIntegrationTests.swift
+445 −16 Tests/SentryTests/Integrations/Performance/FramesTracking/SentryFramesTrackerTests.swift
+1 −0 Tests/SentryTests/Integrations/Performance/SentryPerformanceTrackingIntegrationTests.swift
+215 −131 Tests/SentryTests/Integrations/Performance/UIViewController/SentryTimeToDisplayTrackerTest.swift
+13 −4 ...s/SentryTests/Integrations/Performance/UIViewController/SentryUIViewControllerPerformanceTrackerTests.swift
+2 −1 Tests/SentryTests/Integrations/UIEvents/SentryUIEventTrackerTests.swift
+1 −1 Tests/SentryTests/PrivateSentrySDKOnlyTests.swift
+3 −2 Tests/SentryTests/Protocol/TestData.swift
+1 −1 Tests/SentryTests/SentryClientTests.swift
+5 −0 Tests/SentryTests/SentryOptionsTest.m
+18 −0 Tests/SentryTests/SentrySDKTests.swift
+108 −11 Tests/SentryTests/Transaction/SentrySpanTests.swift
+108 −62 Tests/SentryTests/Transaction/SentryTracerTests.swift
+13 −2 Tests/ThreadSanitizer.sup
+7 −45 develop-docs/README.md
+0 −42 develop-docs/auto-ui-performance-tracking.svg
+0 −20 develop-docs/auto-ui-performance-tracking.wsd
+0 −44 develop-docs/performance-api.svg
+0 −22 develop-docs/performance-api.wsd
+28 −0 scripts/create-cherry-pick-branch.sh
2 changes: 1 addition & 1 deletion modules/sentry-java
Submodule sentry-java updated 78 files
+9 −18 .github/workflows/agp-matrix.yml
+21 −44 .github/workflows/build.yml
+17 −14 .github/workflows/codeql-analysis.yml
+1 −1 .github/workflows/enforce-license-compliance.yml
+2 −9 .github/workflows/generate-javadocs.yml
+10 −5 .github/workflows/integration-tests-benchmarks.yml
+7 −14 .github/workflows/integration-tests-ui.yml
+40 −0 .github/workflows/release-build.yml
+22 −0 CHANGELOG.md
+10 −4 Makefile
+22 −0 build.gradle.kts
+6 −5 buildSrc/src/main/java/Config.kt
+3 −3 gradle.properties
+23 −20 sentry-android-core/src/main/java/io/sentry/android/core/AndroidProfiler.java
+44 −14 sentry-android-core/src/main/java/io/sentry/android/core/NetworkBreadcrumbsIntegration.java
+0 −3 sentry-android-core/src/test/java/io/sentry/android/core/ActivityBreadcrumbsIntegrationTest.kt
+8 −7 sentry-android-core/src/test/java/io/sentry/android/core/AnrV2IntegrationTest.kt
+199 −125 sentry-android-core/src/test/java/io/sentry/android/core/NetworkBreadcrumbsIntegrationTest.kt
+3 −0 sentry-android-core/src/test/java/io/sentry/android/core/SentryAndroidTest.kt
+0 −62 ...sentry-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SdkBenchmarkTest.kt
+3 −1 ...try-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SentryBenchmarkTest.kt
+9 −3 ...roid-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/EnvelopeTests.kt
+0 −1 ...droid-integration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/SdkInitTests.kt
+26 −13 ...egration-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/mockservers/MockRelay.kt
+40 −39 ...tion-tests/sentry-uitest-android/src/androidTest/java/io/sentry/uitest/android/mockservers/RelayAsserter.kt
+1 −0 sentry-android-integration-tests/sentry-uitest-android/src/main/AndroidManifest.xml
+4 −1 sentry-apollo-3/api/sentry-apollo-3.api
+3 −1 sentry-apollo-3/src/main/java/io/sentry/apollo3/SentryApollo3ClientException.kt
+3 −1 sentry-graphql/api/sentry-graphql.api
+23 −4 sentry-graphql/src/main/java/io/sentry/graphql/SentryDataFetcherExceptionHandler.java
+20 −2 sentry-graphql/src/main/java/io/sentry/graphql/SentryGenericDataFetcherExceptionHandler.java
+3 −3 sentry-graphql/src/main/java/io/sentry/graphql/SentryGraphqlExceptionHandler.java
+8 −3 sentry-graphql/src/main/java/io/sentry/graphql/SentryInstrumentation.java
+1 −1 sentry-graphql/src/test/kotlin/io/sentry/graphql/SentryDataFetcherExceptionHandlerTest.kt
+1 −1 sentry-graphql/src/test/kotlin/io/sentry/graphql/SentryGenericDataFetcherExceptionHandlerTest.kt
+6 −1 sentry-graphql/src/test/kotlin/io/sentry/graphql/SentryInstrumentationAnotherTest.kt
+6 −1 sentry-graphql/src/test/kotlin/io/sentry/graphql/SentryInstrumentationTest.kt
+3 −1 sentry-opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry/SentrySpanProcessor.java
+3 −1 ...opentelemetry/sentry-opentelemetry-core/src/main/java/io/sentry/opentelemetry/SpanDescriptionExtractor.java
+1 −1 sentry-opentelemetry/sentry-opentelemetry-core/src/test/kotlin/SentrySpanProcessorTest.kt
+1 −1 ...-samples-spring-boot-jakarta/src/main/java/io/sentry/samples/spring/boot/jakarta/SecurityConfiguration.java
+1 −1 ...les/sentry-samples-spring-jakarta/src/main/java/io/sentry/samples/spring/jakarta/SecurityConfiguration.java
+1 −1 sentry-spring-boot-jakarta/api/sentry-spring-boot-jakarta.api
+1 −1 ...spring-boot-jakarta/src/main/java/io/sentry/spring/boot/jakarta/graphql/SentryGraphqlAutoConfiguration.java
+60 −0 sentry-spring-boot-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentryAutoConfigurationTest.kt
+5 −1 ...y-spring-boot-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentrySpanRestTemplateCustomizerTest.kt
+1 −1 sentry-spring-boot/api/sentry-spring-boot.api
+1 −1 sentry-spring-boot/src/main/java/io/sentry/spring/boot/graphql/SentryGraphqlAutoConfiguration.java
+60 −0 sentry-spring-boot/src/test/kotlin/io/sentry/spring/boot/SentryAutoConfigurationTest.kt
+5 −1 sentry-spring-boot/src/test/kotlin/io/sentry/spring/boot/SentrySpanRestTemplateCustomizerTest.kt
+2 −1 sentry-spring-jakarta/api/sentry-spring-jakarta.api
+3 −0 sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/checkin/SentryQuartzConfiguration.java
+5 −2 ...pring-jakarta/src/main/java/io/sentry/spring/jakarta/graphql/SentryDataFetcherExceptionResolverAdapter.java
+9 −1 sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/graphql/SentryGraphqlBeanPostProcessor.java
+1 −0 sentry-spring-jakarta/src/main/java/io/sentry/spring/jakarta/webflux/SentryReactorThreadLocalAccessor.java
+2 −1 sentry-spring/api/sentry-spring.api
+3 −0 sentry-spring/src/main/java/io/sentry/spring/checkin/SentryQuartzConfiguration.java
+5 −2 sentry-spring/src/main/java/io/sentry/spring/graphql/SentryDataFetcherExceptionResolverAdapter.java
+8 −1 sentry-spring/src/main/java/io/sentry/spring/graphql/SentryGraphqlBeanPostProcessor.java
+3 −0 sentry/api/sentry.api
+1 −0 sentry/src/main/java/io/sentry/DataCategory.java
+18 −1 sentry/src/main/java/io/sentry/SentryOptions.java
+2 −5 sentry/src/main/java/io/sentry/cache/EnvelopeCache.java
+26 −61 sentry/src/main/java/io/sentry/cache/PersistingOptionsObserver.java
+3 −0 sentry/src/main/java/io/sentry/clientreport/ClientReportRecorder.java
+1 −1 sentry/src/main/java/io/sentry/exception/InvalidSentryTraceHeaderException.java
+1 −1 sentry/src/main/java/io/sentry/exception/SentryHttpClientException.java
+2 −0 sentry/src/main/java/io/sentry/transport/RateLimiter.java
+7 −0 sentry/src/test/java/io/sentry/JsonSerializerTest.kt
+1 −0 sentry/src/test/java/io/sentry/PreviousSessionFinalizerTest.kt
+2 −0 sentry/src/test/java/io/sentry/SentryTest.kt
+6 −2 sentry/src/test/java/io/sentry/clientreport/ClientReportTest.kt
+7 −1 sentry/src/test/java/io/sentry/protocol/SdkVersionSerializationTest.kt
+13 −0 sentry/src/test/java/io/sentry/protocol/SentryBaseEventSerializationTest.kt
+13 −0 sentry/src/test/java/io/sentry/protocol/SentryEnvelopeHeaderSerializationTest.kt
+13 −0 sentry/src/test/java/io/sentry/protocol/SentryEventSerializationTest.kt
+13 −0 sentry/src/test/java/io/sentry/protocol/SentryTransactionSerializationTest.kt
+5 −1 sentry/src/test/java/io/sentry/transport/RateLimiterTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,12 @@ public static SentryOptions getOptions() {
IHub hub = Sentry.getCurrentHub();
return hub.getOptions();
}

public static int isCrashedLastRun() {
Boolean isCrashed = Sentry.isCrashedLastRun();
if(isCrashed == null) {
return -1;
}
return isCrashed ? 1 : 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,28 @@ bool SentrySubsystemAndroid::IsEnabled()
return FSentryJavaObjectWrapper::CallStaticMethod<bool>(SentryJavaClasses::Sentry, "isEnabled", "()Z");
}

ESentryCrashedLastRun SentrySubsystemAndroid::IsCrashedLastRun()
{
ESentryCrashedLastRun unrealIsCrashed = ESentryCrashedLastRun::NotEvaluated;

switch (FSentryJavaObjectWrapper::CallStaticMethod<int>(SentryJavaClasses::SentryBridgeJava, "isCrashedLastRun", "()I"))
{
case -1:
unrealIsCrashed = ESentryCrashedLastRun::NotEvaluated;
break;
case 0:
unrealIsCrashed = ESentryCrashedLastRun::NotCrashed;
break;
case 1:
unrealIsCrashed = ESentryCrashedLastRun::Crashed;
break;
default:
UE_LOG(LogSentrySdk, Warning, TEXT("Unknown IsCrashedLastRun result. NotEvaluated will be returned."));
}

return unrealIsCrashed;
}

void SentrySubsystemAndroid::AddBreadcrumb(USentryBreadcrumb* breadcrumb)
{
TSharedPtr<SentryBreadcrumbAndroid> breadcrumbAndroid = StaticCastSharedPtr<SentryBreadcrumbAndroid>(breadcrumb->GetNativeImpl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class SentrySubsystemAndroid : public ISentrySubsystem
virtual void InitWithSettings(const USentrySettings* settings, USentryBeforeSendHandler* beforeSendHandler) override;
virtual void Close() override;
virtual bool IsEnabled() override;
virtual ESentryCrashedLastRun IsCrashedLastRun() override;
virtual void AddBreadcrumb(USentryBreadcrumb* breadcrumb) override;
virtual void ClearBreadcrumbs() override;
virtual USentryId* CaptureMessage(const FString& message, ESentryLevel level) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void SentrySubsystemApple::InitWithSettings(const USentrySettings* settings, USe
#if PLATFORM_IOS
options.attachScreenshot = settings->AttachScreenshot;
#endif
options.initialScope = ^(SentryScope *scope) {
options.initialScope = ^(SentryScope* scope) {
if(settings->EnableAutoLogAttachment) {
const FString logFilePath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*FGenericPlatformOutputDevices::GetAbsoluteLogFilename());
SentryAttachment* logAttachment = [[SENTRY_APPLE_CLASS(SentryAttachment) alloc] initWithPath:logFilePath.GetNSString()];
Expand Down Expand Up @@ -91,6 +91,11 @@ bool SentrySubsystemApple::IsEnabled()
return [SENTRY_APPLE_CLASS(SentrySDK) isEnabled];
}

ESentryCrashedLastRun SentrySubsystemApple::IsCrashedLastRun()
{
return [SENTRY_APPLE_CLASS(SentrySDK) crashedLastRun] ? ESentryCrashedLastRun::Crashed : ESentryCrashedLastRun::NotCrashed;
}

void SentrySubsystemApple::AddBreadcrumb(USentryBreadcrumb* breadcrumb)
{
TSharedPtr<SentryBreadcrumbApple> breadcrumbIOS = StaticCastSharedPtr<SentryBreadcrumbApple>(breadcrumb->GetNativeImpl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class SentrySubsystemApple : public ISentrySubsystem
virtual void InitWithSettings(const USentrySettings* settings, USentryBeforeSendHandler* beforeSendHandler) override;
virtual void Close() override;
virtual bool IsEnabled() override;
virtual ESentryCrashedLastRun IsCrashedLastRun() override;
virtual void AddBreadcrumb(USentryBreadcrumb* breadcrumb) override;
virtual void ClearBreadcrumbs() override;
virtual USentryId* CaptureMessage(const FString& message, ESentryLevel level) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ void SentrySubsystemDesktop::InitWithSettings(const USentrySettings* settings, U

isEnabled = initResult == 0 ? true : false;

sentry_clear_crashed_last_run();

#if PLATFORM_WINDOWS && ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
if(settings->EnableAutoCrashCapturing)
{
Expand Down Expand Up @@ -175,6 +177,28 @@ bool SentrySubsystemDesktop::IsEnabled()
return isEnabled;
}

ESentryCrashedLastRun SentrySubsystemDesktop::IsCrashedLastRun()
{
ESentryCrashedLastRun unrealIsCrashed = ESentryCrashedLastRun::NotEvaluated;

switch (sentry_get_crashed_last_run())
{
case -1:
unrealIsCrashed = ESentryCrashedLastRun::NotEvaluated;
break;
case 0:
unrealIsCrashed = ESentryCrashedLastRun::NotCrashed;
break;
case 1:
unrealIsCrashed = ESentryCrashedLastRun::Crashed;
break;
default:
UE_LOG(LogSentrySdk, Warning, TEXT("Unknown IsCrashedLastRun result. NotEvaluated will be returned."));
}

return unrealIsCrashed;
}

void SentrySubsystemDesktop::AddBreadcrumb(USentryBreadcrumb* breadcrumb)
{
GetCurrentScope()->AddBreadcrumb(breadcrumb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class SentrySubsystemDesktop : public ISentrySubsystem
virtual void InitWithSettings(const USentrySettings* settings, USentryBeforeSendHandler* beforeSendHandler) override;
virtual void Close() override;
virtual bool IsEnabled() override;
virtual ESentryCrashedLastRun IsCrashedLastRun() override;
virtual void AddBreadcrumb(USentryBreadcrumb* breadcrumb) override;
virtual void ClearBreadcrumbs() override;
virtual USentryId* CaptureMessage(const FString& message, ESentryLevel level) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ISentrySubsystem
virtual void InitWithSettings(const USentrySettings* settings, USentryBeforeSendHandler* beforeSendHandler) = 0;
virtual void Close() = 0;
virtual bool IsEnabled() = 0;
virtual ESentryCrashedLastRun IsCrashedLastRun() = 0;
virtual void AddBreadcrumb(USentryBreadcrumb* breadcrumb) = 0;
virtual void ClearBreadcrumbs() = 0;
virtual USentryId* CaptureMessage(const FString& message, ESentryLevel level) = 0;
Expand Down
8 changes: 8 additions & 0 deletions plugin-dev/Source/Sentry/Private/SentrySubsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ bool USentrySubsystem::IsEnabled()
return SubsystemNativeImpl->IsEnabled();
}

ESentryCrashedLastRun USentrySubsystem::IsCrashedLastRun()
{
if (!SubsystemNativeImpl || !SubsystemNativeImpl->IsEnabled())
return ESentryCrashedLastRun::NotEvaluated;

return SubsystemNativeImpl->IsCrashedLastRun();
}

void USentrySubsystem::AddBreadcrumb(USentryBreadcrumb* Breadcrumb)
{
if (!SubsystemNativeImpl || !SubsystemNativeImpl->IsEnabled())
Expand Down
8 changes: 8 additions & 0 deletions plugin-dev/Source/Sentry/Public/SentryDataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ enum class ESentryLevel : uint8
Warning,
Error,
Fatal
};

UENUM(BlueprintType)
enum class ESentryCrashedLastRun : uint8
{
NotEvaluated,
NotCrashed,
Crashed
};
4 changes: 4 additions & 0 deletions plugin-dev/Source/Sentry/Public/SentrySubsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ class SENTRY_API USentrySubsystem : public UEngineSubsystem
UFUNCTION(BlueprintPure, Category = "Sentry")
bool IsEnabled();

/** Checks whether the app crashed during the last run. */
UFUNCTION(BlueprintPure, Category = "Sentry")
ESentryCrashedLastRun IsCrashedLastRun();

/**
* Adds a breadcrumb to the current Scope.
*
Expand Down
2 changes: 1 addition & 1 deletion plugin-dev/sentry-cli.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=2.23.0
version=2.25.0
repo=https://github.com/getsentry/sentry-cli

0 comments on commit 418d981

Please sign in to comment.