-
-
Notifications
You must be signed in to change notification settings - Fork 220
Errors with sentry-native launching with Sentry.AspNetCore on Dockerized Native AOT builds on Linux #4127
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
Comments
Thanks for raising this. to unblock you, there is an option in MSbuild you can use
Looks like this option was released yet so we'll put a release out asap to unblock you. Other than that we need to debug this as this shouldn't be happening. Are you using a proper nuget dependency? like adding sentry via nuget? is something possibly deleting our native libraries from the obj/bin folders? |
We'll ship a release tomorrow either with the option name. Or with the current solution so you can work around this. But looking in more detail about the issue: Note the publish args: linux-x64 is there, should that work on musl linux? |
I think you might need to build a new one. Even if it looked for the directory (which can be checked with the RID graph) the native binaries are generally not portable between different libc implementations. |
We specify the path explicitly, so after adding the build, we'll also need to update this code: sentry-dotnet/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets Lines 36 to 41 in 084e3b4
|
I think we need to make a release asap where we disable sentry-native if we detect RID is linux-musl |
Release finally done: https://github.com/getsentry/sentry-dotnet/releases/tag/5.6.0 Sorry took a minute. We had issues with our release automation. <SentryNative>false</SentryNative> |
Good news, this got resolved in the native SDK: Now, following his work on: |
Indeed, sentry-native has been fixed to support musl with all backends. The way sentry-dotnet builds sentry-native with Edit: Fixes released in sentry-native 0.8.5. |
Hm, just testing the disabling of sentry native now on 5.7.0, but I don't think it's working for a project depending on <PackageReference Include="Sentry" Version="5.7.0" />
<PackageReference Include="Sentry.AspNetCore" Version="5.7.0" /> Tried the following: <PropertyGroup>
<DisableSentryNative>true</DisableSentryNative>
<SentryNative>false</SentryNative>
</PropertyGroup>
<ItemGroup>
<RuntimeHostConfigurationOption Include="Sentry.Native.IsEnabled" Value="false" />
</ItemGroup> When we add the integration with builder.Services.AddSentry(); Upon hitting any asp endpoint we still result in:
|
@ionite34 that shouldn't be happening, logically. Setting
And that gets used to determine whether SentryNative is included... e.g. here: sentry-dotnet/src/Sentry/Platforms/Native/buildTransitive/Sentry.Native.targets Lines 36 to 41 in 084e3b4
Is it possible the logs that you're seeing are from an older build of your product that is still using an earlier version of the Sentry SDK? If not, you could try running your build with the |
Package
Sentry
.NET Flavor
.NET
.NET Version
9.0.201
OS
Linux
OS Version
alpine 3.21
Development Environment
Other
SDK Version
5.5.1
Self-Hosted Sentry Version
No response
Workload Versions
N/A
UseSentry or SentrySdk.Init call
N/A
Steps to Reproduce
Expected Result
Should be able to launch normally
Actual Result
Upon hitting endpoints we'll get a 500 error with:
Might be related to #4116 and #4102
An option to disable this sentry-native usage might be helpful for now since this is a blocker for us deploying Sentry at all on our Native AOT containers just for request exceptions logging and traces.
We're currently using https://www.nuget.org/packages/Microsoft.ApplicationInsights.aspnetcore on these containers, and despite build time trim warnings it still works fine so far in regards to capturing exceptions and traces.
The text was updated successfully, but these errors were encountered: