Skip to content

Attachments in sentry subsystem ConfigureScope fail to upload #191

@adamboerema

Description

@adamboerema

Environment

How do you use Sentry?
Sentry SaaS

Which version of the SDK?
0.2.0

How did you install the package? (Git-URL, Assetstore)
Manually included Sentry Unreal Plugin in project

Which version of Unreal?
4.27.2

Is this happening in Unreal (editor) or on a player like Android, iOS, Windows?
Android

Steps to Reproduce

Configured custom attachments on the ConfigureScope callback in the GameInstance Init method. Local logs show the file being found and attached but on Sentry the log is not included in the crash event attachments. However, manually calling ConfigureEventWithScope or ConfigureMessageWithScope properly includes the attachment with the same delegate.

I've also tried this in blueprints using your documentation with no success either.

Expected Result

I would expect to see the attachment included in the crash event.

Actual Result

No attachment is included in the crash event.

Code sample:

void UCustomLoggingManager::ConfigureScope()
{
	FConfigureScopeDelegate Delegate;
	Delegate.BindDynamic(this, &UCustomLoggingManager::HandleScope);
	SentrySubsystem->ConfigureScope(Delegate);
}

void UCustomLoggingManager::HandleScope(USentryScope* Scope)
{
	if(!Scope) return;

	const FString FilePath = FPaths::Combine(FPaths::ProjectLogDir(), TEXT("client.log"));
	const FString SentryFileName(TEXT("client.log"));
	
	USentryAttachment* PathAttachment = NewObject<USentryAttachment>();
	PathAttachment->InitializeWithPath(FilePath, SentryFileName);
	Scope->AddAttachment(PathAttachment);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Attachmentsissue relates to attachments, i.e. screenshots, view hierarchy, file attachmentsBugsomething isn't working as it shouldUnreal Engineplatform label
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions