Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce debug files uploaded #2404

Merged
merged 8 commits into from
Jun 1, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- The device architecture (x64, arm64, etc.) is now reported
- On Windows, the OS type is now reported as "Windows" instead of "WinUI". Additionally, the OS display version (ex, "22H2") is now included.
- `UIKit`, `ABI.Microsoft` and `WinRT` frames are now marked "system" instead of "in app".
- Reduce debug files uploaded ([#2404](https://github.com/getsentry/sentry-dotnet/pull/2404))
- Fix system frames being marked as "in-app" ([#2408](https://github.com/getsentry/sentry-dotnet/pull/2408))
- NOTE: This important fix corrects a value that is used during issue grouping, so you may receive new alerts for existing issues after deploying this update.

Expand Down
9 changes: 8 additions & 1 deletion src/Sentry/buildTransitive/Sentry.targets
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@
<Message Importance="High"
Text="Preparing to upload debug symbols to Sentry for $(MSBuildProjectName) ($(Configuration)/$(TargetFramework))" />

<Exec Command="$(SentryCLIUploadCommand) $(OutputPath)" IgnoreExitCode="true" ContinueOnError="WarnAndContinue">
<ItemGroup>
<SentryCLIUploadSymbolType Include="pdb" />
<SentryCLIUploadSymbolType Include="portablepdb" />
<SentryCLIUploadSymbolType Include="dsym" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'" />
<SentryCLIUploadSymbolType Include="dsym" Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'" />
</ItemGroup>

<Exec Command="$(SentryCLIUploadCommand) @(SentryCLIUploadSymbolType -> '-t %(Identity)', ' ') $(OutputPath)" IgnoreExitCode="true" ContinueOnError="WarnAndContinue">
<Output TaskParameter="ExitCode" PropertyName="_SentryCLIExitCode" />
</Exec>

Expand Down
4 changes: 0 additions & 4 deletions test/sentry-cli-integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,21 @@ BeforeAll {
Describe 'CLI-integration' {

It "uploads symbols and sources for a console app build" {
$exe = [RuntimeInformation]::IsOSPlatform([OSPlatform]::Windows) ? '.exe' : ''
$result = DotnetBuild 'Sentry.Samples.Console.Basic' $True $True
$result.ScriptOutput | Should -Contain 'Build succeeded.'
$result.HasErrors() | Should -BeFalse
$result.UploadedDebugFiles() | Sort-Object -Unique | Should -Be @(
'Sentry.pdb',
"Sentry.Samples.Console.Basic$exe",
'Sentry.Samples.Console.Basic.pdb',
'Sentry.Samples.Console.Basic.src.zip')
}

It "uploads symbols for a console app build" {
$exe = [RuntimeInformation]::IsOSPlatform([OSPlatform]::Windows) ? '.exe' : ''
$result = DotnetBuild 'Sentry.Samples.Console.Basic' $True $False
$result.ScriptOutput | Should -Contain 'Build succeeded.'
$result.HasErrors() | Should -BeFalse
$result.UploadedDebugFiles() | Sort-Object -Unique | Should -Be @(
'Sentry.pdb',
"Sentry.Samples.Console.Basic$exe",
'Sentry.Samples.Console.Basic.pdb')
}

Expand Down