mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added back AppInsights
This commit is contained in:
parent
89c1e1d55c
commit
6865361069
4 changed files with 5 additions and 6 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ServerManager.WebApplication;
|
||||
|
||||
|
|
@ -17,8 +16,4 @@ public class Program
|
|||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
//.ConfigureLogging((hostingContext, options) =>
|
||||
//{
|
||||
// options.AddApplicationInsights();
|
||||
//});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.21.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class Startup
|
|||
});
|
||||
|
||||
services.AddHealthChecks();
|
||||
services.AddApplicationInsightsTelemetry();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"ApplicationInsights": {
|
||||
"InstrumentationKey": ""
|
||||
},
|
||||
|
||||
"EnableSwagger": true,
|
||||
"SwaggerRoutePrefix": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue