Skip to content
Merged

4.0.0 #2631

Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
be4d8d5
nit: changelog spacing
bruno-garcia Sep 18, 2023
a4efd31
move to mobile platform targets to net7 (#2624)
bruno-garcia Sep 18, 2023
97c5f7c
Update CHANGELOG.md
bruno-garcia Sep 18, 2023
3efc18f
Skip ApiApprovalTests.verify.cs until v4.0.0 (#2658)
jamescrosswell Sep 26, 2023
56e5b06
Removed IHasDistribution and added Distrubution to IEventLike instead…
jamescrosswell Sep 26, 2023
8706936
Merged IHasTransactionNameSource into ITransactionContext (#2654)
jamescrosswell Sep 26, 2023
300f248
Merged ISpanContext into ITraceContext (#2668)
jamescrosswell Sep 26, 2023
8084c05
Merged IHasBreadcrumbs into IEventLike (#2670)
jamescrosswell Sep 27, 2023
83dbdf8
dotnet workload list runs silently (#2627)
jamescrosswell Sep 18, 2023
7e72926
fix: Overload for `ContinueTrace` to accept headers as `string` (#2601)
bitsandfoxes Sep 18, 2023
cd5e6a4
Fixes: Identifying Users with OpenTelemetry doesn't work (#2618)
jamescrosswell Sep 18, 2023
1005f3f
feat: Tracing without Performance for Azure Function Workers (#2630)
bitsandfoxes Sep 19, 2023
f50dcd4
Construct hint items lazily (avoid unnecessary allocations when not u…
jamescrosswell Sep 19, 2023
5f5f22e
Init Sentry before OpenTelemetry (#2635)
jamescrosswell Sep 19, 2023
ca9829d
ref: Instantiating `_tags` for Spans lazily (#2636)
bitsandfoxes Sep 19, 2023
9df5b21
ref: SpanId creation (#2619)
bitsandfoxes Sep 19, 2023
db17a69
ref: azure functions pkg change (#2637)
bruno-garcia Sep 20, 2023
cad89b4
chore: update modules/sentry-cocoa to 8.12.0 (#2640)
github-actions[bot] Sep 20, 2023
18d9ca8
chore: Update CHANGELOG.md (#2643)
bitsandfoxes Sep 20, 2023
5a79e7f
release: 3.40.0-beta.0
getsentry-bot Sep 21, 2023
cecb99d
chore: update scripts/update-cli.ps1 to 2.21.0 (#2645)
github-actions[bot] Sep 22, 2023
5cb67de
Added memory optimisations for GetLastActiveSpan (#2642)
jamescrosswell Sep 24, 2023
f45a0dc
chore: update scripts/update-cli.ps1 to 2.21.1 (#2647)
github-actions[bot] Sep 24, 2023
e9a113d
Update HubTests.cs (#2649)
jamescrosswell Sep 25, 2023
3474989
Removed legacy group (#2651)
jamescrosswell Sep 25, 2023
3836a94
fix: Replacing `Carthage` with `xcodebuild` (#2672)
bitsandfoxes Sep 27, 2023
11e6855
fixup changelog
vaind Sep 27, 2023
0c386ee
Fixed: Changelog prevents CI Builds in v4.0.0 branches
jamescrosswell Sep 28, 2023
0aed969
Throw ArgumentNullException if DSN is null (#2655)
jamescrosswell Sep 28, 2023
3c3182d
Merged IHasMeasurements into ISpanData (#2659)
jamescrosswell Oct 2, 2023
08d6926
Merge branch 'main' into feat/4.0.0
vaind Oct 3, 2023
ede4a04
feat: Enable `CaptureFailedRequests` by default (#2688)
bitsandfoxes Oct 3, 2023
b28cc31
chore: align StackFrame's properties (#2691)
vaind Oct 3, 2023
8c40320
Remove additional `TransactionTracer` constructors (#2694)
bitsandfoxes Oct 4, 2023
82d90cb
Removed `Scope.Platform` as it would never be applied. (#2695)
jamescrosswell Oct 5, 2023
5e0d377
feat: Native AOT frame info (#2701)
vaind Oct 5, 2023
c420292
fix build on mac m1 (#2702)
vaind Oct 5, 2023
7fec1be
Upgraded to `NLog 5` (#2697)
bitsandfoxes Oct 6, 2023
0f77c67
fix: CaptureFailedRequests xml docs
bruno-garcia Oct 6, 2023
38fd446
Fallback to `AssemblyVersion` if `InformalVersion` is `NullOrEmpty` (…
bitsandfoxes Oct 10, 2023
813d027
Reenabled API Verify tests (#2716)
bitsandfoxes Oct 11, 2023
7e12c2b
Reordered parameters to TransactionContext and SpanContext constructo…
jamescrosswell Oct 11, 2023
4fa245b
Change signature order in `DiagnosticLogger` for exceptions (#2715)
bitsandfoxes Oct 12, 2023
f286c62
chore: update scripts/update-cli.ps1 to 2.21.2 (#2698)
github-actions[bot] Oct 5, 2023
dfc1e76
build(deps): bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0…
dependabot[bot] Oct 9, 2023
00a77ae
Fix: Scope not being applied to OpenTelemetry spans in ASP.NET Core (…
jamescrosswell Oct 9, 2023
c96ac8b
Delete SentryAzureFunctions.slnf (#2708)
bruno-garcia Oct 10, 2023
fa48b25
Apply Scope to exceptions captured via Activity.RecordException (#2712)
jamescrosswell Oct 10, 2023
f0f785e
release: 3.40.0
getsentry-bot Oct 10, 2023
35c269a
Update .craft.yml (#2615)
jamescrosswell Oct 11, 2023
69bef53
Make ISentryUserFactory public (#2719)
jamescrosswell Oct 12, 2023
161c79d
chore: update scripts/update-java.ps1 to 6.31.0 (#2723)
github-actions[bot] Oct 13, 2023
e1c2c04
release: 3.40.1
getsentry-bot Oct 12, 2023
c7da8ac
chore(deps): update Cocoa SDK to v8.13.1 (#2722)
github-actions[bot] Oct 13, 2023
a9068b4
Merge branch 'main' into feat/4.0.0
vaind Oct 14, 2023
8163910
chore: fix changelog merge
vaind Oct 14, 2023
467f066
chore: update API verified.txt
vaind Oct 14, 2023
5aa3280
refactor: change DebugImage.ImageAddress to long (#2725)
vaind Oct 15, 2023
1d16e00
build with dotnet 8 sdk (#2622)
bruno-garcia Oct 17, 2023
d32f05b
sentry-native SDK integration (#2704)
vaind Oct 17, 2023
ebbb500
Renamed ISpan and ITransaction to ISpanTracer and ITransactionTracer …
jamescrosswell Oct 18, 2023
738714d
Merge remote-tracking branch 'getsentry/main' into feat/4.0.0
jamescrosswell Oct 18, 2023
7e82f99
Update Sentry.NoMobile.sln
jamescrosswell Oct 18, 2023
6e18dee
CI cleanup (#2733)
bitsandfoxes Oct 18, 2023
941d9dc
Removed `WithScope` and `WithScopeAsync` (#2717)
bitsandfoxes Oct 18, 2023
a34e984
Contexts inherit from IDictionary<string, object> (#2729)
jamescrosswell Oct 18, 2023
441386b
chore: pin .net version in global.json (#2742)
vaind Oct 19, 2023
91b22a9
Feat: native AOT debug info upload (#2739)
vaind Oct 23, 2023
1007ba3
Consolidated CaptureEvent API methods (#2749)
jamescrosswell Oct 23, 2023
30a73ad
Merge branch 'main' into feat/4.0.0
jamescrosswell Oct 23, 2023
e0bef79
See diff when dirty check fails (#2755)
jamescrosswell Oct 24, 2023
79ddcb0
ci: install xamarin-ios if not found (#2757)
vaind Oct 24, 2023
99105fe
Make Sentry.PlatformAbstractions.Runtime.Identifier get only (#2764)
jamescrosswell Oct 27, 2023
d691018
Made Sentry.Values<T> internal (#2771)
jamescrosswell Oct 31, 2023
a448ab3
Update CHANGELOG.md
vaind Oct 31, 2023
835226b
chore: include debug info in sentry-native static build (#2765)
vaind Nov 1, 2023
63a05ba
feat: sentry-native macOS integration (#2767)
vaind Nov 1, 2023
20276c5
refactor: merge Sentry.Bindings.Native into Sentry (#2777)
vaind Nov 2, 2023
68e143b
Trimming for .NET 7+ in Sentry Core (#2732)
jamescrosswell Nov 2, 2023
3dfff8c
preprocessor directives at index 0
bruno-garcia Nov 2, 2023
2d7a9dd
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 2, 2023
3ebfcb0
Remove TracePropagationTarget (#2763)
jamescrosswell Nov 3, 2023
076b0f1
Chore: minor improvements (#2769)
vaind Nov 3, 2023
f1fd43d
drop net461 in favor of net462 (#2786)
bruno-garcia Nov 4, 2023
e186ced
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 4, 2023
4080ac6
remove deprecated frameworks (#2787)
bruno-garcia Nov 5, 2023
7b330dd
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 5, 2023
e9c84a6
update contributing and remove unused snapshot test files (#2790)
bruno-garcia Nov 5, 2023
8f167a0
Added CMake as a dependency to CONTRIBUTING.md (#2795)
jamescrosswell Nov 6, 2023
c52c430
fix: Native AOT resolution (#2799)
vaind Nov 7, 2023
b8484ec
Merge branch 'main' into feat/4.0.0
jamescrosswell Nov 7, 2023
8b89fcd
Added IsAotCompatible for uncomplicated projects (#2793)
jamescrosswell Nov 8, 2023
9a2497d
Fixed warnings when generating cocoa bindings (#2805)
jamescrosswell Nov 8, 2023
1284b8d
Merge remote-tracking branch 'origin/main' into feat/4.0.0
vaind Nov 8, 2023
1da6154
fix: net8 JSON serialization (#2810)
vaind Nov 8, 2023
e590886
feat: packaging native runtime libs (#2781)
vaind Nov 8, 2023
211aba8
fixup: runtime tests after #2781 merge
vaind Nov 8, 2023
ad87961
Merge branch 'main' into feat/4.0.0
vaind Nov 8, 2023
c86fd6f
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 8, 2023
8dcacef
fix changelog heading
bruno-garcia Nov 8, 2023
4ff7f8a
release: 4.0.0-alpha.0
getsentry-bot Nov 8, 2023
c259c41
Consistent names for Transactions for ASP.NET Core routes (#2808)
jamescrosswell Nov 8, 2023
9a1bbcf
update comments
vaind Nov 9, 2023
79695bb
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 9, 2023
2e3d757
test on net8.0 (#2791)
bruno-garcia Nov 9, 2023
daaa05b
Merge branch 'main' into feat/4.0.0
vaind Nov 9, 2023
6709bf5
Merge branch 'release/4.0.0-alpha.0' into feat/4.0.0
bruno-garcia Nov 9, 2023
c2f78e7
prep next release
bruno-garcia Nov 9, 2023
3d0eb8b
disable vulnerabilities workflow
vaind Nov 9, 2023
f539268
chore: cleanup v4 changelog (#2824)
vaind Nov 13, 2023
83d8b4e
fix: don't add WinUI integration on mobile (#2821)
vaind Nov 13, 2023
f661d07
Refactor: move DebugImage and DebugMeta to Sentry.Protocol (#2815)
vaind Nov 13, 2023
9937a76
fix: NativeAOT inApp setting (#2831)
vaind Nov 14, 2023
f8f7147
Merge branch 'main' into feat/4.0.0
vaind Nov 14, 2023
975f174
chore: update dotnet-8 to final release (#2836)
vaind Nov 15, 2023
7f4b8fa
ci: cache supplemental build (#2839)
vaind Nov 15, 2023
ea5dddc
chore: net8 samples (#2830)
vaind Nov 15, 2023
b84faa8
Remove ConfigureFromConfigurationOptions<T> from Sentry.Extensions.Lo…
jamescrosswell Nov 16, 2023
2a60c09
Removed obsolete options (#2841)
bitsandfoxes Nov 16, 2023
0873db3
fix: missing metadata dependency (#2843)
vaind Nov 16, 2023
0d643ff
feat: NativeAOT iOS support (#2820)
vaind Nov 16, 2023
dd9cfac
feat: Add NET8 to major packages (#2852)
vaind Nov 16, 2023
2c0d18a
Fix `4.0.0-beta.0` changelog (#2855)
bitsandfoxes Nov 16, 2023
34b8f9c
Unobsoleted `SentryClient.Dispose` (#2842)
bitsandfoxes Nov 17, 2023
15c5c39
chore: fixup changelog (#2837)
vaind Nov 14, 2023
7f727f5
chore: update scripts/update-cli.ps1 to 2.21.5 (#2851)
github-actions[bot] Nov 16, 2023
128e372
Merge remote-tracking branch 'origin/main' into feat/4.0.0
vaind Nov 17, 2023
12e23cb
chore: remove obsolete APIs (#2856)
vaind Nov 17, 2023
69806bc
feat: Enrich transactions (#2838)
bitsandfoxes Nov 17, 2023
749c9a7
Removed `IUserFactory` in favor of `ISentryUserFactory` (#2840)
bitsandfoxes Nov 17, 2023
1ccc4a6
release: 4.0.0-beta.0
getsentry-bot Nov 17, 2023
0ae0922
Merge branch 'release/4.0.0-beta.0' into feat/4.0.0
Nov 17, 2023
5c549d1
readme: remove minidump pkg and api docs
bruno-garcia Nov 17, 2023
0c5d50f
chore: cleanup obsolete pragmas (#2857)
vaind Nov 18, 2023
bd198f9
chore: bump M.SourceLink.GitHub to 8.0.0
bruno-garcia Nov 18, 2023
329e2ee
remove explicit pkg ref SourceLink
bruno-garcia Nov 18, 2023
1dfbc64
remove netstandard from the console sample
vaind Nov 19, 2023
6f46891
pack profiling nuget package (#2800)
bruno-garcia Nov 19, 2023
30c8eba
remove ns2.1 from nlog (#2864)
bruno-garcia Nov 19, 2023
1179610
Chore: deduplicate device tests (#2858)
vaind Nov 19, 2023
9832c88
release: 4.0.0-beta.1
getsentry-bot Nov 19, 2023
ebaed3e
Merge branch 'release/4.0.0-beta.1' into feat/4.0.0
Nov 19, 2023
84925a9
Undo renaming of ISpan (#2870)
jamescrosswell Nov 20, 2023
7584368
Removed ConfigureFromConfigurationOptions<SentryAspNetCoreOptions> (#…
jamescrosswell Nov 20, 2023
89b2f6a
fix: aspnetcore dependency (#2873)
bruno-garcia Nov 21, 2023
c32be36
fix: upload Android native symbols (#2876)
vaind Nov 21, 2023
f79ab7b
Add Tests to ensure BindableOptions are consistent with Options (#2875)
jamescrosswell Nov 21, 2023
cf2d206
renamed (#2879)
bitsandfoxes Nov 21, 2023
5ba1121
Merge branch 'main' into feat/4.0.0
jamescrosswell Nov 22, 2023
5d20a0c
Updated BindableSentryAspNetCoreOptions to pass tests
jamescrosswell Nov 22, 2023
24cfe5b
Dropped `netstandard2.0` for ASP.NET Core (#2807)
bitsandfoxes Nov 22, 2023
0ea0f0a
fix: Sentry.Serilog throws with a disabled DSN (#2883)
jamescrosswell Nov 22, 2023
9e8c58f
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 22, 2023
fa1a5c6
release: 4.0.0-beta.2
getsentry-bot Nov 23, 2023
464fd4c
Only set FrameworkSupportsAot for net8.0+ (#2889)
jamescrosswell Nov 23, 2023
9fa8f3c
Merge branch 'release/4.0.0-beta.2' into feat/4.0.0
Nov 23, 2023
c0b7607
fix: changelog 4.0 beta
bruno-garcia Nov 23, 2023
2e4649c
chore: support NativeAOT only on net8+ (#2892)
vaind Nov 23, 2023
c179895
Chore: .net8 native interop cleanups (#2893)
vaind Nov 23, 2023
ba1a198
fix pragma location
bruno-garcia Nov 23, 2023
e6bf7a8
merged main
bitsandfoxes Nov 24, 2023
e08d4f6
fix ci
vaind Nov 24, 2023
2ff2e7c
CI Ignores changes to `.md` files (#2906)
bitsandfoxes Nov 27, 2023
b50c28d
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 27, 2023
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

### Mobile support changes

.NET 6 on mobile is out of support since May 2023. With .NET 8 coming,
it won't be possible to build .NET 6 Mobile specific targets.
For that reason, we're moving the mobile specific TFMs from `net6.0-platform` to `net7.0-platform`.
Mobile apps still on .NET 6 will pull the `Sentry` .NET 6, which offers the .NET-only features,
without native/platform specific bindings and SDKs. See [this ticket for more details](https://github.com/getsentry/sentry-dotnet/issues/2623).

- Drop .NET 6 Mobile in favor of .NET 7 ([#2624](https://github.com/getsentry/sentry-dotnet/pull/2604))

### Features

- Sentry tracing middleware now gets configured automatically ([#2602](https://github.com/getsentry/sentry-dotnet/pull/2602))
Expand All @@ -11,6 +21,7 @@
- Bump CLI from v2.20.6 to v2.20.7 ([#2604](https://github.com/getsentry/sentry-dotnet/pull/2604))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2207)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.20.6...2.20.7)

## 3.39.1

### Fixes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
<TargetFramework>net7.0-android</TargetFramework>
<!-- BG8605 and BG8606 happen because there's a missing androidx.lifecycle dependency, but we don't need it here. (The native Android Sentry SDK will use it if it exists.) -->
<NoWarn>$(NoWarn);BG8605;BG8606</NoWarn>
<SentryAndroidSdkVersion>6.29.0</SentryAndroidSdkVersion>
Expand Down
6 changes: 3 additions & 3 deletions src/Sentry.Bindings.Cocoa/Sentry.Bindings.Cocoa.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And '$(NO_MACCATALYST)' == ''">net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And '$(NO_MACCATALYST)' == 'true'">net6.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == 'true' And '$(NO_MACCATALYST)' == ''">net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And '$(NO_MACCATALYST)' == ''">net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And '$(NO_MACCATALYST)' == 'true'">net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == 'true' And '$(NO_MACCATALYST)' == ''">net7.0-maccatalyst</TargetFrameworks>
<IsBindingProject>true</IsBindingProject>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
<Description>.NET Bindings for the Sentry Cocoa SDK</Description>
Expand Down
10 changes: 5 additions & 5 deletions src/Sentry.Maui/Sentry.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
Target other platforms so we can include platform-specific code, and bundle native SDKs.
-->
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net6.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net6.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_WINDOWS)' == '' And !$([MSBuild]::IsOSPlatform('Linux'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_WINDOWS)' == '' And !$([MSBuild]::IsOSPlatform('Linux'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>

<!-- Target Tizen only if the Tizen SDK workload pack is installed. -->
<TargetFrameworks Condition="'$(NO_TIZEN)' == '' And Exists('$(MSBuildBinPath)\..\..\packs\Samsung.Tizen.Sdk')">$(TargetFrameworks);net6.0-tizen</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_TIZEN)' == '' And Exists('$(MSBuildBinPath)\..\..\packs\Samsung.Tizen.Sdk')">$(TargetFrameworks);net7.0-tizen</TargetFrameworks>

<!--
This flag allows us to target Windows-specific code when building on OSX, so we can build and pack all platforms on a single machine.
Expand Down
6 changes: 4 additions & 2 deletions src/Sentry/Internal/Extensions/CollectionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ public static void TryCopyTo<TKey, TValue>(this IDictionary<TKey, TValue> from,
}
}

#if !NET8_0_OR_GREATER
public static Dictionary<TKey, TValue> ToDictionary<TKey, TValue>(
this IEnumerable<KeyValuePair<TKey, TValue>> source) where TKey : notnull =>
source.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
#endif

public static IEnumerable<KeyValuePair<TKey, TValue>> WhereNotNullValue<TKey, TValue>(
this IEnumerable<KeyValuePair<TKey, TValue?>> source) where TKey : notnull
Expand All @@ -44,17 +46,17 @@ public static IEnumerable<KeyValuePair<TKey, TValue>> WhereNotNullValue<TKey, TV
}
}
}

public static IEnumerable<KeyValuePair<TKey, TValue>> Append<TKey, TValue>(
this IEnumerable<KeyValuePair<TKey, TValue>> source, TKey key, TValue value) =>
source.Append(new KeyValuePair<TKey, TValue>(key, value));

public static IReadOnlyList<T> AsReadOnly<T>(this IList<T> list) =>
list as IReadOnlyList<T> ?? new ReadOnlyCollection<T>(list);

#if !NET7_0_OR_GREATER
public static IReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary)
where TKey : notnull =>
new ReadOnlyDictionary<TKey, TValue>(dictionary);
#endif

public static IEnumerable<T> ExceptNulls<T>(this IEnumerable<T?> source) =>
source.Where(x => x != null).Select(x => x!);
Expand Down
12 changes: 9 additions & 3 deletions src/Sentry/Internal/Http/DefaultSentryHttpClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ public HttpClient Create(SentryOptions options)
HttpMessageHandler handler = options.CreateHttpMessageHandler?.Invoke() ?? new HttpClientHandler();
if (handler is HttpClientHandler httpClientHandler)
{
if (options.HttpProxy != null)
if (options.HttpProxy is not null)
{
httpClientHandler.Proxy = options.HttpProxy;
options.LogInfo("Using Proxy: {0}", options.HttpProxy);
// [CA1416] This call site is reachable on: 'ios' 10.0 and later, 'maccatalyst' 10.0 and later. 'HttpClientHandler.Proxy' is unsupported on: 'ios' all versions, 'maccatalyst' all versions.
#if NET6_0_OR_GREATER
if (!OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())
#endif
{
httpClientHandler.Proxy = options.HttpProxy;
options.LogInfo("Using Proxy: {0}", options.HttpProxy);
}
}

// If the platform supports automatic decompression
Expand Down
7 changes: 7 additions & 0 deletions src/Sentry/Platforms/Android/SentrySdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise
return null;
}

#pragma warning disable CS0618 // Type or member is obsolete
var packageInfo = AppContext.PackageManager?.GetPackageInfo(packageName, PackageInfoFlags.Permissions);
#pragma warning restore CS0618 // Type or member is obsolete
return packageInfo == null ? null : $"{packageName}@{packageInfo.VersionName}+{packageInfo.GetVersionCode()}";
}

Expand All @@ -234,7 +236,9 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise
return null;
}

#pragma warning disable CS0618 // Type or member is obsolete
var packageInfo = AppContext.PackageManager?.GetPackageInfo(packageName, PackageInfoFlags.Permissions);
#pragma warning restore CS0618 // Type or member is obsolete
return packageInfo?.GetVersionCode();
}

Expand All @@ -251,7 +255,10 @@ private static void AndroidEnvironment_UnhandledExceptionRaiser(object? _, Raise

#pragma warning disable CS0618
// obsolete on Android >= P (28)
#pragma warning disable CA1422
// 'PackageInfo.VersionCode' is obsoleted on: 'Android' 28.0 and later.
return packageInfo.VersionCode;
#pragma warning restore CA1422
#pragma warning restore CS0618
}
}
6 changes: 3 additions & 3 deletions src/Sentry/Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

<PropertyGroup Condition="'$(SolutionName)' != 'Sentry.Unity'">
<TargetFrameworks>net6.0;net5.0;netcoreapp3.0;netstandard2.1;netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net6.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net6.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_ANDROID)' == ''">$(TargetFrameworks);net7.0-android</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_IOS)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-ios</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(SolutionName)' == 'Sentry.Unity'">
Expand Down