Skip to content

Commit 0910732

Browse files
committed
AspNetCoreBootstrapper - enable analysis
1 parent eeb5af1 commit 0910732

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/BootstrapperHostingStartup.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public BootstrapperHostingStartup()
2929
}
3030

3131
/// <summary>
32-
/// This method gets called by the runtime to lightup ASP.NET Core OpenTelemetry Logs Collection.
32+
/// This method gets called by the runtime to light up ASP.NET Core OpenTelemetry Logs Collection.
3333
/// </summary>
3434
/// <param name="builder">The <see cref="IWebHostBuilder"/>.</param>
3535
public void Configure(IWebHostBuilder builder)
@@ -73,7 +73,9 @@ private static string GetApplicationName()
7373
{
7474
return AppDomain.CurrentDomain.FriendlyName;
7575
}
76+
#pragma warning disable CA1031 // Do not catch general exception
7677
catch (Exception ex)
78+
#pragma warning restore CA1031 // Do not catch general exception
7779
{
7880
Logger.Error($"Error getting AppDomain.CurrentDomain.FriendlyName: {ex}");
7981
return string.Empty;

src/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper/OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<PropertyGroup>
66
<TargetFrameworks>net8.0</TargetFrameworks>
77
<Description>ASP.NET Core Bootstrapper used by the OpenTelemetry.AutoInstrumentation project.</Description>
8+
<AnalysisLevel>latest-All</AnalysisLevel>
89
</PropertyGroup>
910

1011
<ItemGroup>

0 commit comments

Comments
 (0)