Skip to content

Commit

Permalink
telemetry logging (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbesen authored Dec 22, 2024
1 parent 6d04128 commit 6d58154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions StpFoodBlazor/StpFoodBlazor/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using StpFoodBlazor.Components;
using StpFoodBlazor.Services;
using Azure.Monitor.OpenTelemetry.AspNetCore;

var builder = WebApplication.CreateBuilder(args);
builder.Configuration.AddEnvironmentVariables();
Expand All @@ -8,6 +9,8 @@
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
builder.Services.AddOpenTelemetry().UseAzureMonitor();

builder.Services.AddHttpClient();
builder.Services.AddScoped<IDealService, HttpDealService>();
builder.Services.AddScoped<ITimeService, TimeService>();
Expand Down
1 change: 1 addition & 0 deletions StpFoodBlazor/StpFoodBlazor/StpFoodBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.2.0" />
<ProjectReference Include="..\StpFoodBlazor.Client\StpFoodBlazor.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" />
</ItemGroup>
Expand Down

0 comments on commit 6d58154

Please sign in to comment.