Skip to content

Commit fb13b03

Browse files
committed
Merge branch 'main' into feat/ios-native-profiling
2 parents ba4982a + a2fa21f commit fb13b03

File tree

74 files changed

+1389
-893
lines changed

Some content is hidden

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

74 files changed

+1389
-893
lines changed

CHANGELOG.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,48 @@
22

33
## Unreleased
44

5+
### API breaking Changes
6+
7+
#### Changed APIs
8+
9+
- Rename iOS and MacCatalyst platform specific options from `Cocoa` to `Native` ([#2940](https://github.com/getsentry/sentry-dotnet/pull/2940))
10+
- Rename iOS platform specific options `EnableCocoaSdkTracing` to `EnableTracing` ([#2940](https://github.com/getsentry/sentry-dotnet/pull/2940))
11+
- Rename Android platform specific options from `Android` to `Native` ([#2940](https://github.com/getsentry/sentry-dotnet/pull/2940))
12+
- Rename Android platform specific options `EnableAndroidSdkTracing` and `EnableAndroidSdkBeforeSend` to `EnableTracing` and `EnableBeforeSend` respectively ([#2940](https://github.com/getsentry/sentry-dotnet/pull/2940))
13+
14+
### Dependencies
15+
16+
- Bump Cocoa SDK from v8.17.0 to v8.17.1 ([#2936](https://github.com/getsentry/sentry-dotnet/pull/2936))
17+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8171)
18+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.17.0...8.17.1)
19+
20+
## 4.0.0-beta.3
21+
22+
### Fixes
23+
24+
- Reworked automatic breadcrumb creation for MAUI. ([#2900](https://github.com/getsentry/sentry-dotnet/pull/2900))
25+
- The SDK no longer uses on reflection to bind to all public element events. This also fixes issues where the SDK would consume third-party events.
26+
- Added `CreateElementEventsBreadcrumbs` to the SentryMauiOptions to allow users to opt-in automatic breadcrumb creation for `BindingContextChanged`, `ChildAdded`, `ChildRemoved` and `ParentChanged` on `Element`.
27+
- Reduced amount of automatic breadcrumbs by limiting the amount of bindings created in `VisualElement`, `Window`, `Shell`, `Page` and `Button`.
28+
- Fixed Sentry SDK has not been initialised when using ASP.NET Core, Serilog and OpenTelemetry ([#2911](https://github.com/getsentry/sentry-dotnet/pull/2911))
29+
530
### Features
631

732
- Native crash reporting on NativeAOT published apps (Windows, Linux, macOS). ([#2887](https://github.com/getsentry/sentry-dotnet/pull/2887))
33+
- Android: By default attaches LogCat logs to unhandled exceptions. Configurable via `SentryOptions.Android.LogCatIntegration` and `SentryOptions.Android.LogCatMaxLines`. Available when targeting `net7.0-android` or later, on API level 23 or later. ([#2926](https://github.com/getsentry/sentry-dotnet/pull/2926))
834

935
### API breaking Changes
1036

37+
- The method used to configure a Sentry Sink for Serilog now has an additional overload. Calling `WriteTo.Sentry()` with no arguments will no longer attempt to initialize the SDK (it has optional arguments to configure the behaviour of the Sink only). If you want to initialize Sentry at the same time you configure the Sentry Sink then you will need to use the overload of this method that accepts a DSN as the first parameter (e.g. `WriteTo.Sentry("https://[email protected]:65535/2147483647")`). ([#2928](https://github.com/getsentry/sentry-dotnet/pull/2928))
38+
1139
#### Removed APIs
1240

13-
- SentrySinkExtensions.ConfigureSentrySerilogOptions is now internal. If you were using this method, please use one of the `SentrySinkExtensions.Sentry` extension methods instead. ([#2902](https://github.com/getsentry/sentry-dotnet/pull/2902))
41+
- SentrySinkExtensions.ConfigureSentrySerilogOptions is now internal. If you were using this method, please use one of the `SentrySinkExtensions.Sentry` extension methods instead. ([#2902](https://github.com/getsentry/sentry-dotnet/pull/2902))
1442

15-
### Fixes
43+
#### Changed APIs
1644

17-
- Fixed Sentry SDK has not been initialised when using ASP.NET Core, Serilog and OpenTelemetry ([#2911](https://github.com/getsentry/sentry-dotnet/pull/2911))
45+
- `AssemblyExtensions` have been made public again. ([#2917](https://github.com/getsentry/sentry-dotnet/pull/2917))
46+
- Rename iOS and MacCatalyst platform specific options from `iOS` to `Cocoa` ([#2929](https://github.com/getsentry/sentry-dotnet/pull/2929))
1847

1948
### Dependencies
2049

@@ -27,6 +56,9 @@
2756
- Bump Native SDK from v0.6.5 to v0.6.7 ([#2914](https://github.com/getsentry/sentry-dotnet/pull/2914))
2857
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#067)
2958
- [diff](https://github.com/getsentry/sentry-native/compare/0.6.5...0.6.7)
59+
- Bump Java SDK from v6.34.0 to v7.0.0 ([#2932](https://github.com/getsentry/sentry-dotnet/pull/2932))
60+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#700)
61+
- [diff](https://github.com/getsentry/sentry-java/compare/6.34.0...7.0.0)
3062

3163
## 4.0.0-beta.2
3264

@@ -189,6 +221,7 @@ There are some functional differences when publishing Native AOT:
189221
- `StackTraceMode.Enhanced` is ignored because it's not available when publishing Native AOT. The mechanism to generate these enhanced stack traces relies heavily on reflection which isn't compatible with trimming.
190222
- Reflection cannot be leveraged for JSON Serialization and you may need to use `SentryOptions.AddJsonSerializerContext` to supply a serialization context for types that you'd like to send to Sentry (e.g. in the `Span.Context`). ([#2732](https://github.com/getsentry/sentry-dotnet/pull/2732), [#2793](https://github.com/getsentry/sentry-dotnet/pull/2793))
191223
- WinUI applications: when publishing Native AOT, Sentry isn't able to automatically register an unhandled exception handler because that relies on reflection. You'll need to [register the unhandled event handler manually](https://github.com/getsentry/sentry-dotnet/issues/2778) instead.
224+
- For Azure Functions Workers, when AOT/Trimming is enabled we can't use reflection to read route data from the HttpTrigger so the route name will always be `/api/<FUNCTION_NAME>` ([#2920](https://github.com/getsentry/sentry-dotnet/pull/2920))
192225

193226
### Dependencies
194227

@@ -199,6 +232,11 @@ There are some functional differences when publishing Native AOT:
199232
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2222)
200233
- [diff](https://github.com/getsentry/sentry-cli/compare/2.21.5...2.22.2)
201234

235+
## 3.41.3
236+
237+
### Fixes
238+
239+
- Fixed Sentry SDK has not been initialised when using ASP.NET Core, Serilog and OpenTelemetry ([#2918](https://github.com/getsentry/sentry-dotnet/pull/2918))
202240

203241
## 3.41.2
204242

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Although the files in `/src/Sentry/Platforms/` are part of the `Sentry` project,
4848
```xml
4949
<!-- Platform-specific props included here -->
5050
<Import Project="Platforms\Android\Sentry.Android.props" Condition="'$(TargetPlatformIdentifier)' == 'android'" />
51-
<Import Project="Platforms\iOS\Sentry.iOS.props" Condition="'$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />
51+
<Import Project="Platforms\Cocoa\Sentry.Cocoa.props" Condition="'$(TargetPlatformIdentifier)' == 'ios' Or '$(TargetPlatformIdentifier)' == 'maccatalyst'" />
5252
```
5353

5454
These `*.props` files are used to add platform-specific files, such as references to the binding projects for each native SDK (which provide .NET wrappers around native Android or Cocoa functions).

Directory.Build.props

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

33
<PropertyGroup>
4-
<Version>4.0.0-beta.2</Version>
4+
<Version>4.0.0-beta.3</Version>
55
<LangVersion>12</LangVersion>
66
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
77
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory).assets\Sentry.snk</AssemblyOriginatorKeyFile>
@@ -10,9 +10,6 @@
1010
<Features>strict</Features>
1111
<ImplicitUsings>true</ImplicitUsings>
1212

13-
<!-- Ignore EOL warnings... we need to support old stuff -->
14-
<CheckEolWorkloads>false</CheckEolWorkloads>
15-
1613
<!-- Allow references to unsigned assemblies (like MAUI) from signed projects -->
1714
<NoWarn>$(NoWarn);CS8002</NoWarn>
1815
</PropertyGroup>
@@ -68,12 +65,6 @@
6865
<DefineConstants Condition="'$(TargetPlatformIdentifier)' == ''">$(DefineConstants);PLATFORM_NEUTRAL</DefineConstants>
6966
</PropertyGroup>
7067

71-
<!-- We're aware it's out of support but this is a library and it doesn't require nca3.1. -->
72-
<!-- there's no reason to cause friction to a consumer that for some reason is stuck on an unsupported version. -->
73-
<PropertyGroup>
74-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
75-
</PropertyGroup>
76-
7768
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
7869
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
7970
<DefineConstants>$(DefineConstants);CI_BUILD</DefineConstants>

Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
</ItemGroup>
2020

2121
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'ios' And '$(TargetPlatformIdentifier)' != 'maccatalyst'">
22+
<!-- Exclude our platform-specific code: -->
23+
<Compile Remove="**\*.Cocoa.cs" />
24+
<Compile Remove="**\Cocoa\**\*.cs" />
25+
<!-- Maui device test projects have these too: -->
2226
<Compile Remove="**\*.iOS.cs" />
2327
<Compile Remove="**\iOS\**\*.cs" />
2428
</ItemGroup>

modules/sentry-cocoa

Submodule sentry-cocoa updated 137 files

samples/Sentry.Samples.Android/MainActivity.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Sentry.Android;
2+
13
namespace Sentry.Samples.Android;
24

35
[Activity(Label = "@string/app_name", MainLauncher = true)]
@@ -9,6 +11,8 @@ protected override void OnCreate(Bundle? savedInstanceState)
911
{
1012
o.Dsn = "https://[email protected]/5428537";
1113
o.SendDefaultPii = true; // adds the user's IP address automatically
14+
o.Native.LogCatIntegration = LogCatIntegrationType.Errors; // Get logcat logs for both handled and unhandled errors; default is unhandled only
15+
o.Native.LogCatMaxLines = 1000; // Defaults to 1000
1216
});
1317

1418
// Here's an example of adding custom scope information.

samples/Sentry.Samples.Maui/MainPage.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ private void OnNativeCrashClicked(object sender, EventArgs e)
8888
#endif
8989
}
9090
}
91-
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Sentry.Extensions.Logging;
2+
3+
namespace Sentry.Azure.Functions.Worker;
4+
5+
/// <inheritdoc cref="BindableSentryOptions"/>
6+
internal class BindableSentryAzureFunctionsOptions : BindableSentryLoggingOptions
7+
{
8+
public void ApplyTo(SentryAzureFunctionsOptions options)
9+
{
10+
base.ApplyTo(options);
11+
}
12+
}

src/Sentry.Azure.Functions.Worker/Sentry.Azure.Functions.Worker.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<Description>Official Azure Functions Worker SDK integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
77
</PropertyGroup>
88

9+
<PropertyGroup Condition="'$(FrameworkSupportsAot)' == 'true'">
10+
<IsAotCompatible>true</IsAotCompatible>
11+
<EnableConfigurationBindingGenerator>true</EnableConfigurationBindingGenerator>
12+
</PropertyGroup>
13+
914
<ItemGroup>
1015
<ProjectReference Include="..\Sentry.Extensions.Logging\Sentry.Extensions.Logging.csproj" />
1116
</ItemGroup>

src/Sentry.Azure.Functions.Worker/SentryAzureFunctionsOptionsSetup.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33

44
namespace Sentry.Azure.Functions.Worker;
55

6+
#if NET8_0_OR_GREATER
7+
internal class SentryAzureFunctionsOptionsSetup : IConfigureOptions<SentryAzureFunctionsOptions>
8+
{
9+
private readonly IConfiguration _config;
10+
11+
public SentryAzureFunctionsOptionsSetup(IConfiguration config)
12+
{
13+
ArgumentNullException.ThrowIfNull(config);
14+
_config = config;
15+
}
16+
17+
public void Configure(SentryAzureFunctionsOptions options)
18+
{
19+
ArgumentNullException.ThrowIfNull(options);
20+
21+
var bindable = new BindableSentryAzureFunctionsOptions();
22+
_config.Bind(bindable);
23+
bindable.ApplyTo(options);
24+
25+
// These can't be changed by the user
26+
options.TagFilters.Add("AzureFunctions_");
27+
}
28+
}
29+
#else
630
internal class SentryAzureFunctionsOptionsSetup : ConfigureFromConfigurationOptions<SentryAzureFunctionsOptions>
731
{
832
public SentryAzureFunctionsOptionsSetup(IConfiguration config) : base(config)
@@ -20,3 +44,4 @@ public override void Configure(SentryAzureFunctionsOptions options)
2044
options.TagFilters.Add("AzureFunctions_");
2145
}
2246
}
47+
#endif

0 commit comments

Comments
 (0)