Skip to content

Commit c3950f0

Browse files
authored
Merge branch 'main' into alexsohn/chore/use-commit-sha-for-github-actions
2 parents 6e09784 + c8da336 commit c3950f0

File tree

67 files changed

+1537
-286
lines changed

Some content is hidden

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

67 files changed

+1537
-286
lines changed

.github/actions/environment/action.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ runs:
2424
shell: bash
2525
run: sudo chmod 666 /var/run/docker.sock
2626

27+
# Install old deprecated libssl1 for .NET 5.0 on Linux
28+
- name: Install libssl1 for NET 5.0 on Linux
29+
if: ${{ runner.os == 'Linux' }}
30+
shell: bash
31+
run: sudo ./scripts/install-libssl1.sh
32+
2733
- name: Install Linux ARM 32-bit dependencies
2834
if: ${{ matrix.rid == 'linux-arm' }}
2935
shell: bash
@@ -87,9 +93,15 @@ runs:
8793
- name: Install .NET SDK
8894
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
8995
with:
90-
dotnet-version: |
91-
8.0.x
92-
9.0.304
96+
global-json-file: global.json
97+
dotnet-version: 8.0.x
98+
99+
# .NET 5.0 does not support ARM64 on macOS
100+
- name: Install .NET 5.0 SDK
101+
if: ${{ runner.os != 'macOS' || runner.arch != 'ARM64' }}
102+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
103+
with:
104+
dotnet-version: 5.0.x
93105

94106
- name: Install .NET Workloads
95107
shell: bash

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ jobs:
6464
key: sentry-native-${{ matrix.rid }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
6565
enableCrossOsArchive: true
6666

67-
- name: Remove unused applications
68-
if: ${{ !matrix.container }}
69-
uses: ./.github/actions/freediskspace
70-
7167
- run: scripts/build-sentry-native.ps1
7268
if: steps.cache.outputs.cache-hit != 'true'
7369
shell: pwsh
@@ -301,7 +297,12 @@ jobs:
301297

302298
- name: Run MSBuild
303299
id: msbuild
304-
run: msbuild Sentry-CI-Build-Windows.slnf -t:Restore,Build -p:Configuration=Release --nologo -v:minimal -flp:logfile=msbuild.log -p:CopyLocalLockFileAssemblies=true -bl:msbuild.binlog
300+
run: msbuild Sentry-CI-Build-Windows.slnf -t:Restore,Build,Pack -p:Configuration=Release --nologo -v:minimal -flp:logfile=msbuild.log -p:CopyLocalLockFileAssemblies=true -bl:msbuild.binlog
301+
302+
- name: Test MSBuild
303+
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
304+
with:
305+
path: integration-test/msbuild.Tests.ps1
305306

306307
- name: Upload logs
307308
if: ${{ always() }}

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: ./.github/actions/environment
3636

3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
38+
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
3939
with:
4040
languages: csharp
4141

@@ -49,6 +49,6 @@ jobs:
4949
run: dotnet build Sentry-CI-CodeQL.slnf --no-restore --nologo
5050

5151
- name: Perform CodeQL Analysis
52-
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
52+
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
5353
with:
5454
category: '/language:csharp'

CHANGELOG.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,45 @@
22

33
## Unreleased
44

5+
### Dependencies
6+
7+
- Bump Java SDK from v8.22.0 to v8.23.0 ([#4586](https://github.com/getsentry/sentry-dotnet/pull/4586))
8+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8230)
9+
- [diff](https://github.com/getsentry/sentry-java/compare/8.22.0...8.23.0)
10+
11+
## 5.16.0
12+
13+
### Features
14+
15+
- Added `EnableBackpressureHandling` option for Automatic backpressure handling. When enabled this automatically reduces the sample rate when the SDK detects events being dropped. ([#4452](https://github.com/getsentry/sentry-dotnet/pull/4452))
16+
- Add (experimental) _Structured Logs_ integration for `Serilog` ([#4462](https://github.com/getsentry/sentry-dotnet/pull/4462))
17+
518
### Fixes
619

20+
- Templates are no longer sent with Structured Logs that have no parameters ([#4544](https://github.com/getsentry/sentry-dotnet/pull/4544))
21+
- Parent-Span-IDs are no longer sent with Structured Logs when recorded without an active Span ([#4565](https://github.com/getsentry/sentry-dotnet/pull/4565))
722
- Upload linked PDBs to fix non-IL-stripped symbolication for iOS ([#4527](https://github.com/getsentry/sentry-dotnet/pull/4527))
823
- In MAUI Android apps, generate and inject UUID to APK and upload ProGuard mapping to Sentry with the UUID ([#4532](https://github.com/getsentry/sentry-dotnet/pull/4532))
924
- Fixed WASM0001 warning when building Blazor WebAssembly projects ([#4519](https://github.com/getsentry/sentry-dotnet/pull/4519))
1025

26+
### API Changes
27+
28+
- Remove `ExperimentalAttribute` from all _Structured Logs_ APIs, and remove `Experimental` property from `SentrySdk`, but keep `Experimental` property on `SentryOptions` ([#4567](https://github.com/getsentry/sentry-dotnet/pull/4567))
29+
1130
### Dependencies
1231

13-
- Bump CLI from v2.54.0 to v2.55.0 ([#4556](https://github.com/getsentry/sentry-dotnet/pull/4556))
14-
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2550)
15-
- [diff](https://github.com/getsentry/sentry-cli/compare/2.54.0...2.55.0)
32+
- Bump Cocoa SDK from v8.56.0 to v8.56.2 ([#4555](https://github.com/getsentry/sentry-dotnet/pull/4555), [#4572](https://github.com/getsentry/sentry-dotnet/pull/4572))
33+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8562)
34+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.56.0...8.56.2)
35+
- Bump Native SDK from v0.11.0 to v0.11.1 ([#4557](https://github.com/getsentry/sentry-dotnet/pull/4557))
36+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0111)
37+
- [diff](https://github.com/getsentry/sentry-native/compare/0.11.0...0.11.1)
38+
- Bump CLI from v2.54.0 to v2.56.0 ([#4556](https://github.com/getsentry/sentry-dotnet/pull/4556), [#4577](https://github.com/getsentry/sentry-dotnet/pull/4577))
39+
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2560)
40+
- [diff](https://github.com/getsentry/sentry-cli/compare/2.54.0...2.56.0)
41+
- Bump Java SDK from v8.21.1 to v8.22.0 ([#4552](https://github.com/getsentry/sentry-dotnet/pull/4552))
42+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8220)
43+
- [diff](https://github.com/getsentry/sentry-java/compare/8.21.1...8.22.0)
1644

1745
## 5.15.1
1846

@@ -56,8 +84,8 @@
5684
### Dependencies
5785

5886
- Bump sentry-cocoa from 8.39.0 to 8.55.1 ([#4442](https://github.com/getsentry/sentry-dotnet/pull/4442), [#4483](https://github.com/getsentry/sentry-dotnet/pull/4483), [#4485](https://github.com/getsentry/sentry-dotnet/pull/4485))
59-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8551)
60-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.39.0...8.55.1)
87+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8551)
88+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.39.0...8.55.1)
6189
- Bump Native SDK from v0.9.1 to v0.10.1 ([#4436](https://github.com/getsentry/sentry-dotnet/pull/4436), [#4492](https://github.com/getsentry/sentry-dotnet/pull/4492))
6290
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0101)
6391
- [diff](https://github.com/getsentry/sentry-native/compare/0.9.1...0.10.1)

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<VersionPrefix>5.15.1</VersionPrefix>
4+
<VersionPrefix>5.16.0</VersionPrefix>
55
<LangVersion>13</LangVersion>
66
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -86,7 +86,7 @@
8686

8787
<!-- Set the version and local path for Sentry CLI (downloaded in the restore phase of Sentry.csproj) -->
8888
<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
89-
<SentryCLIVersion>2.55.0</SentryCLIVersion>
89+
<SentryCLIVersion>2.56.0</SentryCLIVersion>
9090
<SentryCLIDirectory>$(MSBuildThisFileDirectory)tools\sentry-cli\$(SentryCLIVersion)\</SentryCLIDirectory>
9191
</PropertyGroup>
9292

benchmarks/Sentry.Benchmarks/BackgroundWorkerFlushBenchmarks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public Task SendEnvelopeAsync(Envelope envelope, CancellationToken cancellationT
2020
[IterationSetup]
2121
public void IterationSetup()
2222
{
23-
_backgroundWorker = new BackgroundWorker(new FakeTransport(), new SentryOptions { MaxQueueItems = 1000 });
23+
_backgroundWorker = new BackgroundWorker(new FakeTransport(), new SentryOptions { MaxQueueItems = 1000 }, null);
2424
_event = new SentryEvent();
2525
_envelope = Envelope.FromEvent(_event);
2626

integration-test/common.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ BeforeAll {
154154
Push-Location $projectPath
155155
try
156156
{
157-
dotnet restore | ForEach-Object { Write-Host $_ }
157+
dotnet restore /p:CheckEolTargetFramework=false | ForEach-Object { Write-Host $_ }
158158
if ($LASTEXITCODE -ne 0)
159159
{
160160
throw "Failed to restore the test app project."

integration-test/msbuild.Tests.ps1

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# This file contains test cases for https://pester.dev/
2+
Set-StrictMode -Version Latest
3+
$ErrorActionPreference = 'Stop'
4+
. $PSScriptRoot/common.ps1
5+
6+
$IsARM64 = "Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString())
7+
8+
# NOTE: These .NET versions are used to build a test app that consumes the Sentry
9+
# .NET SDK, and are not tied to the .NET version used to build the SDK itself.
10+
Describe 'MSBuild app' {
11+
BeforeDiscovery {
12+
$frameworks = @()
13+
14+
# .NET 5.0 does not support ARM64 on macOS
15+
if (-not $IsMacOS -or -not $IsARM64)
16+
{
17+
$frameworks += @{
18+
framework = 'net5.0'
19+
sdk = '5.0.400'
20+
# NuGet 5 does not support packageSourceMapping
21+
config = "$PSScriptRoot\nuget5.config"
22+
}
23+
}
24+
25+
$frameworks += @(
26+
@{ framework = 'net8.0'; sdk = '8.0.400' },
27+
@{ framework = 'net9.0'; sdk = '9.0.300' }
28+
)
29+
}
30+
31+
Context '(<framework>)' -ForEach $frameworks {
32+
BeforeEach {
33+
Write-Host "::group::Create msbuild-app"
34+
dotnet new console --no-restore --output msbuild-app --framework $framework | ForEach-Object { Write-Host $_ }
35+
$LASTEXITCODE | Should -Be 0
36+
AddPackageReference msbuild-app Sentry
37+
Push-Location msbuild-app
38+
@'
39+
using System.Runtime.InteropServices;
40+
using Sentry;
41+
42+
SentrySdk.Init(options =>
43+
{
44+
options.Dsn = args[0];
45+
options.Debug = true;
46+
});
47+
48+
SentrySdk.CaptureMessage($"Hello from MSBuild app");
49+
'@ | Out-File Program.cs
50+
Write-Host "::endgroup::"
51+
52+
Write-Host "::group::Setup .NET SDK"
53+
if (Test-Path variable:sdk)
54+
{
55+
# Pin to a specific SDK version to use MSBuild from that version
56+
@"
57+
{
58+
"sdk": {
59+
"version": "$sdk",
60+
"rollForward": "latestFeature"
61+
}
62+
}
63+
"@ | Out-File global.json
64+
}
65+
Write-Host "Using .NET SDK: $(dotnet --version)"
66+
Write-Host "Using MSBuild version: $(dotnet msbuild -version)"
67+
Write-Host "::endgroup::"
68+
}
69+
70+
AfterEach {
71+
Pop-Location
72+
Remove-Item msbuild-app -Recurse -Force -ErrorAction SilentlyContinue
73+
}
74+
75+
It 'builds without warnings and is able to capture a message' {
76+
Write-Host "::group::Restore packages"
77+
if (!(Test-Path variable:config))
78+
{
79+
$config = "$PSScriptRoot/nuget.config"
80+
}
81+
dotnet restore msbuild-app.csproj --configfile $config -p:CheckEolTargetFramework=false | ForEach-Object { Write-Host $_ }
82+
$LASTEXITCODE | Should -Be 0
83+
Write-Host "::endgroup::"
84+
85+
# TODO: pass -p:TreatWarningsAsErrors=true after #4554 is fixed
86+
dotnet msbuild msbuild-app.csproj -t:Build -p:Configuration=Release -p:TreatWarningsAsErrors=false | ForEach-Object { Write-Host $_ }
87+
$LASTEXITCODE | Should -Be 0
88+
89+
Write-Host "::group::Run msbuild-app"
90+
$result = Invoke-SentryServer {
91+
param([string]$url)
92+
$dsn = $url.Replace('http://', 'http://key@') + '/0'
93+
dotnet msbuild msbuild-app.csproj -t:Run -p:Configuration=Release -p:RunArguments=$dsn | ForEach-Object { Write-Host $_ }
94+
$LASTEXITCODE | Should -Be 0
95+
}
96+
$result.HasErrors() | Should -BeFalse
97+
$result.Envelopes() | Should -AnyElementMatch "`"message`":`"Hello from MSBuild app`""
98+
Write-Host "::endgroup::"
99+
}
100+
}
101+
}

integration-test/nuget5.config

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- nuget5.config is meant for testing with .NET 5.0 / NuGet 5. It is otherwise same as
3+
nuget.config but without <packageSourceMapping> which was added in .NET 6.0 / NuGet 6
4+
https://learn.microsoft.com/en-us/nuget/consume-packages/package-source-mapping -->
5+
<configuration>
6+
<packageSources>
7+
<clear />
8+
<add key="integration-test" value="./packages" />
9+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
10+
</packageSources>
11+
</configuration>

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.56.0
1+
version = 8.56.2
22
repo = https://github.com/getsentry/sentry-cocoa

0 commit comments

Comments
 (0)