Skip to content

Commit

Permalink
Add AppInsights support (if configured)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelledruyts committed Dec 4, 2024
1 parent bc3a967 commit 88062da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
19 changes: 10 additions & 9 deletions WebApp/InspectorGadget.WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Google.Protobuf" Version="3.27.3" />
<PackageReference Include="Grpc.Net.Client" Version="2.65.0" />
<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Google.Protobuf" Version="3.29.0" />
<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />
<!-- Grpc to call into SPIFFE Workload API -->
<PackageReference Include="Grpc.Tools" Version="2.65.0">
<PackageReference Include="Grpc.Tools" Version="2.68.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.8" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.42.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.1" />
<PackageReference Include="MySqlConnector" Version="2.3.7" />
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.11" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.46.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="MySqlConnector" Version="2.4.0" />
<PackageReference Include="Npgsql" Version="8.0.6" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions WebApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void ConfigureServices(IServiceCollection services)
// Enforce use of TLS 1.2.
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

services.AddApplicationInsightsTelemetry();
services.AddSingleton<AppSettings>();
services.AddRouting(options =>
{
Expand Down
5 changes: 4 additions & 1 deletion WebApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"ApplicationInsights": {
"ConnectionString": null
}
}

0 comments on commit 88062da

Please sign in to comment.