Skip to content
Draft
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
17 changes: 16 additions & 1 deletion .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ runs:
shell: bash
run: sudo chmod 666 /var/run/docker.sock

# Install old deprecated libssl1 for .NET 5.0 on Linux
- name: Install libssl1 for NET 5.0 on Linux
if: ${{ runner.os == 'Linux' }}
shell: bash
run: sudo ./scripts/install-libssl1.sh

- name: Install Linux ARM 32-bit dependencies
if: ${{ matrix.rid == 'linux-arm' }}
shell: bash
Expand Down Expand Up @@ -56,7 +62,7 @@ runs:
uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f # v3.2.0
with:
# Exclude "tools" because the emulator is not needed (nor available for Windows/Linux ARM64)
packages: platform-tools platforms;android-34 platforms;android-35 build-tools;36.0.0
packages: platform-tools platforms;android-35 platforms;android-36 build-tools;36.0.0
log-accepted-android-sdk-licenses: false

# Java 11 is needed by .NET Android
Expand Down Expand Up @@ -90,6 +96,15 @@ runs:
dotnet-version: |
8.0.x
9.0.304
10.0.100-rc.1.25451.107
global-json-file: global.json

# .NET 5.0 does not support ARM64 on macOS
- name: Install .NET 5.0 SDK
if: ${{ runner.os != 'macOS' || runner.arch != 'ARM64' }}
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: 5.0.x

- name: Install .NET Workloads
shell: bash
Expand Down
36 changes: 25 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,11 @@ jobs:
key: sentry-native-${{ matrix.rid }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
enableCrossOsArchive: true

- name: Remove unused applications
if: ${{ !matrix.container }}
uses: ./.github/actions/freediskspace

- run: scripts/build-sentry-native.ps1
if: steps.cache.outputs.cache-hit != 'true'
shell: pwsh

build:
build-sentry:
needs: build-sentry-native
name: .NET (${{ matrix.rid }})
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -254,7 +250,8 @@ jobs:
uses: actions/checkout@v5
with:
# We only check out what is absolutely necessary to reduce a chance of local files impacting
# integration tests, e.g. Directory.Build.props, nuget.config, ...
# integration tests (nuget.config etc.)... But we need the root Directory.Build.props calculate
# the package version
sparse-checkout: |
integration-test
.github
Expand All @@ -267,11 +264,23 @@ jobs:
path: src

- name: Integration test
if: ${{ (matrix.rid != 'linux-musl-x64') && (matrix.rid != 'linux-musl-arm64') }}
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
with:
path: integration-test

# For the linux-musl runtimes we have to pin the ContainerBaseImage for preview or RC builds, since
# these don't conform to the normal naming conventions and don't get resolved automatically. We do
# by passing it as parameter to aot.Tests.ps1 via an environment variable
- name: Integration test (musl)
if: ${{ (matrix.rid == 'linux-musl-x64') || (matrix.rid == 'linux-musl-arm64') }}
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2
env:
ContainerBaseImage: 'mcr.microsoft.com/dotnet/nightly/runtime-deps:10.0-preview-alpine3.22'
with:
path: integration-test

msbuild:
ms-build:
needs: build-sentry-native
name: MSBuild
runs-on: windows-latest
Expand Down Expand Up @@ -301,7 +310,12 @@ jobs:

- name: Run MSBuild
id: msbuild
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
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

- name: Test MSBuild
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
with:
path: integration-test/msbuild.Tests.ps1

- name: Upload logs
if: ${{ always() }}
Expand All @@ -316,7 +330,7 @@ jobs:
# Unsupported Native AOT runtimes should have SentryNative auto-disabled
# to avoid native library loading errors on startup.
unsupported-aot:
needs: build
needs: build-sentry
name: Unsupported AOT (${{ matrix.rid }})
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -348,7 +362,7 @@ jobs:
path: src

- name: Test AOT
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2
uses: getsentry/github-workflows/sentry-cli/integration-test/@a5e409bd5bad4c295201cdcfe862b17c50b29ab7 # v2.14.1
env:
RuntimeIdentifier: ${{ matrix.rid }}
with:
Expand Down Expand Up @@ -384,7 +398,7 @@ jobs:
uses: ./.github/actions/buildnative

- name: Publish Test app (macOS)
run: dotnet publish test/Sentry.TrimTest/Sentry.TrimTest.csproj -c Release -r osx-arm64
run: dotnet publish test/Sentry.TrimTest/Sentry.TrimTest.csproj -c Release -r osx-arm64 -p:NO_MOBILE=true

- name: Publish Test app (Android)
run: dotnet publish test/Sentry.MauiTrimTest/Sentry.MauiTrimTest.csproj -c Release -f net9.0-android35.0 -r android-arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: ./.github/actions/environment

- name: Initialize CodeQL
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # pin@v2
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
languages: csharp

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # pin@v2
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
category: '/language:csharp'
35 changes: 29 additions & 6 deletions .github/workflows/device-tests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

jobs:
build:
Expand Down Expand Up @@ -64,6 +65,12 @@ jobs:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
# We don't need the Google APIs, but the default images are not available for 32+
ANDROID_EMULATOR_TARGET: google_apis
ANDROID_EMULATOR_RAM_SIZE: 2048M
ANDROID_EMULATOR_ARCH: x86_64
ANDROID_EMULATOR_DISK_SIZE: 4096M
ANDROID_EMULATOR_OPTIONS: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
steps:
# See https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
- name: Enable KVM group perms
Expand All @@ -87,17 +94,33 @@ jobs:
# Cached AVD setup per https://github.com/ReactiveCircus/android-emulator-runner/blob/main/README.md

- name: Run Tests
id: first-run
continue-on-error: true
timeout-minutes: 40
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # Tag: v2.34.0
with:
api-level: ${{ matrix.api-level }}
# We don't need the Google APIs, but the default images are not available for 32+
target: google_apis
target: ${{ env.ANDROID_EMULATOR_TARGET }}
force-avd-creation: false
ram-size: 2048M
arch: x86_64
disk-size: 4096M
emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
ram-size: ${{ env.ANDROID_EMULATOR_RAM_SIZE }}
arch: ${{ env.ANDROID_EMULATOR_ARCH }}
disk-size: ${{ env.ANDROID_EMULATOR_DISK_SIZE }}
emulator-options: ${{ env.ANDROID_EMULATOR_OPTIONS }}
disable-animations: false
script: pwsh scripts/device-test.ps1 android -Run -Tfm ${{ matrix.tfm }}

- name: Retry Tests (if previous failed to run)
if: steps.first-run.outcome == 'failure'
timeout-minutes: 40
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # Tag: v2.34.0
with:
api-level: ${{ matrix.api-level }}
target: ${{ env.ANDROID_EMULATOR_TARGET }}
force-avd-creation: false
ram-size: ${{ env.ANDROID_EMULATOR_RAM_SIZE }}
arch: ${{ env.ANDROID_EMULATOR_ARCH }}
disk-size: ${{ env.ANDROID_EMULATOR_DISK_SIZE }}
emulator-options: ${{ env.ANDROID_EMULATOR_OPTIONS }}
disable-animations: false
script: pwsh scripts/device-test.ps1 android -Run -Tfm ${{ matrix.tfm }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/device-tests-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:

jobs:
ios-tests:
Expand Down
62 changes: 60 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# Changelog

## Unreleased

### BREAKING CHANGES

- SentryOptions.IsEnvironmentUser now defaults to false on MAUI. The means the User.Name will no longer be set, by default, to the name of the device ([#4606](https://github.com/getsentry/sentry-dotnet/pull/4606))
- Remove unnecessary files from SentryCocoaFramework before packing ([#4602](https://github.com/getsentry/sentry-dotnet/pull/4602))

### Fixes

- The SDK avoids redundant scope sync after transaction finish ([#4623](https://github.com/getsentry/sentry-dotnet/pull/4623))

## 6.0.0-preview.1

### BREAKING CHANGES

- This release adds support for .NET 10 and drops support for net8.0-android, net8.0-ios, net8.0-maccatalyst and net8.0-windows10.0.19041.0 ([#4461](https://github.com/getsentry/sentry-dotnet/pull/4461))
- Added support for v3 of the Android AssemblyStore format that is used in .NET 10 and dropped support for v1 that was used in .NET 8 ([#4583](https://github.com/getsentry/sentry-dotnet/pull/4583))

## 5.16.0

### Features

- 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))
- Add (experimental) _Structured Logs_ integration for `Serilog` ([#4462](https://github.com/getsentry/sentry-dotnet/pull/4462))

### Fixes

- Templates are no longer sent with Structured Logs that have no parameters ([#4544](https://github.com/getsentry/sentry-dotnet/pull/4544))
- 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))
- Upload linked PDBs to fix non-IL-stripped symbolication for iOS ([#4527](https://github.com/getsentry/sentry-dotnet/pull/4527))
- 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))
- Fixed WASM0001 warning when building Blazor WebAssembly projects ([#4519](https://github.com/getsentry/sentry-dotnet/pull/4519))

### API Changes

- 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))

### Dependencies

- 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))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8562)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.56.0...8.56.2)
- Bump Native SDK from v0.11.0 to v0.11.1 ([#4557](https://github.com/getsentry/sentry-dotnet/pull/4557))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0111)
- [diff](https://github.com/getsentry/sentry-native/compare/0.11.0...0.11.1)
- Bump CLI from v2.54.0 to v2.55.0 ([#4556](https://github.com/getsentry/sentry-dotnet/pull/4556))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2550)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.54.0...2.55.0)

### Dependencies

- 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))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2560)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.54.0...2.56.0)
- Bump Java SDK from v8.21.1 to v8.22.0 ([#4552](https://github.com/getsentry/sentry-dotnet/pull/4552))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8220)
- [diff](https://github.com/getsentry/sentry-java/compare/8.21.1...8.22.0)

## 5.15.1

### Fixes
Expand Down Expand Up @@ -42,8 +100,8 @@
### Dependencies

- 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))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8551)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.39.0...8.55.1)
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8551)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.39.0...8.55.1)
- 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))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0101)
- [diff](https://github.com/getsentry/sentry-native/compare/0.9.1...0.10.1)
Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,26 @@ Once changes to Ben.Demystifier have been merged into the main branch then, the
should be updated from the main branch and the `modules/make-internal.sh` script run again (if necessary). This repo
should reference the most recent commit on the `internal` branch of Ben.Demystifier then (functionally identical to the
main branch - the only difference being the changes to member visibility).

## Local Sentry Cocoa SDK checkout

By default, `Sentry.Bindings.Cocoa` downloads a pre-built Sentry Cocoa SDK from
GitHub Releases. The version is specified in `modules/sentry-cocoa.properties`.

If you want to build an unreleased Sentry Cocoa SDK version from source instead,
replace the pre-built SDK with [getsentry/sentry-cocoa](https://github.com/getsentry/sentry-cocoa/)
by cloning it into the `modules/sentry-cocoa` directory:

```sh
$ rm -rf modules/sentry-cocoa
$ gh repo clone getsentry/sentry-cocoa modules/sentry-cocoa
$ dotnet build ... # uses modules/sentry-cocoa as is
```

To switch back to the pre-built SDK, delete the `modules/sentry-cocoa` directory
and let the next build download the pre-built SDK again:

```sh
$ rm -rf modules/sentry-cocoa
$ dotnet build ... # downloads pre-built Cocoa SDK into modules/sentry-cocoa
```
23 changes: 20 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>

<PropertyGroup>
<VersionPrefix>5.15.1</VersionPrefix>
<VersionPrefix>6.0.0-preview.1</VersionPrefix>
<VersionSuffix>prerelease</VersionSuffix>
<LangVersion>13</LangVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -20,11 +21,27 @@
<!-- We need to support old stuff. Applications should definitely address these advisory warnings though. -->
<NoWarn>$(NoWarn);NU1902;NU1903</NoWarn>

<!-- For Xcode 26 support in .NET 10 -->
<NoWarn>$(NoWarn);XCODE_26_0_PREVIEW</NoWarn>

<!-- https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/dotnet-restore-audit#version-introduced -->
<WarningsNotAsErrors>NU1902;NU1903</WarningsNotAsErrors>

<!-- Centralized TFM versions -->
<LatestTfm>net10.0</LatestTfm>
<PreviousTfm>net9.0</PreviousTfm>
<OldestTfm>net8.0</OldestTfm>
<CurrentTfms>net8.0;net9.0;net10.0</CurrentTfms>
<LatestAndroidTfm>net10.0-android36.0</LatestAndroidTfm>
<PreviousAndroidTfm>net9.0-android35.0</PreviousAndroidTfm>
<LatestIosTfm>net9.0-ios26</LatestIosTfm>
<PreviousIosTfm>net9.0-ios18.0</PreviousIosTfm>
<LatestMacCatalystTfm>net9.0-maccatalyst26</LatestMacCatalystTfm>
<PreviousMacCatalystTfm>net9.0-maccatalyst18.0</PreviousMacCatalystTfm>
<PreviousWindowsTfm>net9.0-windows10.0.19041.0</PreviousWindowsTfm>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' != 'Release'">
<PropertyGroup Condition="'$(Configuration)' != 'Release' And '$(VersionSuffix)' == ''">
<VersionSuffix>dev</VersionSuffix>
</PropertyGroup>

Expand Down Expand Up @@ -86,7 +103,7 @@

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

Expand Down
Loading