Skip to content

Commit

Permalink
Add ApplicationInsights telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
thohng committed Oct 4, 2022
1 parent f362156 commit b7142b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/WebApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
var appInfo = builder.InitializeSpaApp();
logger.LogApplicationLifetimeEvent("Application initializing...", appInfo);

builder.Services.AddApplicationInsightsTelemetry();

builder.AddSpaApp();

var app = builder.Build();
Expand Down
5 changes: 3 additions & 2 deletions src/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<UserSecretsId>netlah-spaservices-webapp-hp70a</UserSecretsId>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="WebApp.Test" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
<PackageReference Include="NetLah.Extensions.Logging.Serilog.AspNetCore" />
Expand Down

0 comments on commit b7142b8

Please sign in to comment.