Skip to content

SentryTracing crashes ASP.NET web apps on .NET 10 #4735

@kanadaj

Description

@kanadaj

Package

Sentry

.NET Flavor

.NET

.NET Version

10.0.0

OS

Any (not platform specific)

OS Version

No response

Development Environment

Other

SDK Version

5.14.1

Self-Hosted Sentry Version

No response

Workload Versions

Doesn't matter, blank test project works to showcase

UseSentry or SentrySdk.Init call

var builder = WebApplication.CreateBuilder(args);

builder.WebHost.UseSentry(x => ConfigureSentry(x, builder.Environment));

static void ConfigureSentry(SentryAspNetCoreOptions options, IWebHostEnvironment env)
{
    options.Dsn = "https://[email protected]/2";
    options.AutoRegisterTracing = true;
}

Steps to Reproduce

  1. Clone https://github.com/Mitch528/sentry-crash-repro
  2. Run dotnet run
  3. Open the home page
  4. Observe that the app crashes

Expected Result

The app shouldn't crash, the error page should be shown

Actual Result

CLI process terminates. Disabling options.AutoRegisterTracing = true; removes the issue. Not having await before the crash also removes the issue so the async pipeline might also be related.

We also believe that dotnet/runtime#121578 might be related to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeBugSomething isn't working

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions