Skip to content
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

Fix ASP.NET sdk name #2172

Merged
merged 2 commits into from
Feb 9, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fix MAUI missing breadcrumbs for lifecycle and UI events ([#2170](https://github.com/getsentry/sentry-dotnet/pull/2170))
- Fix hybrid sdk names ([#2171](https://github.com/getsentry/sentry-dotnet/pull/2171))
- Fix ASP.NET sdk name ([#2172](https://github.com/getsentry/sentry-dotnet/pull/2172))

## 3.28.0

Expand Down
17 changes: 4 additions & 13 deletions src/Sentry.AspNet/Internal/SystemWebRequestEventProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,10 @@ public SystemWebRequestEventProcessor(IRequestPayloadExtractor payloadExtractor,
@event.Request.Data = body;
}

if (@event.Sdk.Version is null && @event.Sdk.Name is null)
{
@event.Sdk.Name = "sentry.dotnet.aspnet";
@event.Sdk.Version = SdkVersion.Version;
}

if (SdkVersion.Version != null)
{
@event.Sdk.AddPackage(
$"nuget:{SdkVersion.Name}",
SdkVersion.Version);
}

// Always set the SDK info
@event.Sdk.Name = "sentry.dotnet.aspnet";
@event.Sdk.Version = SdkVersion.Version;
@event.Sdk.AddPackage($"nuget:{SdkVersion.Name}", SdkVersion.Version);
return @event;
}
}