Skip to content

Commit

Permalink
Remove Prometheus instrumentation and add Azure Monitor OpenTelemetry…
Browse files Browse the repository at this point in the history
… package
  • Loading branch information
0GiS0 committed Feb 8, 2024
1 parent 8a5ffed commit c08e94c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@

});

builder.Services.Configure<AspNetCoreInstrumentationOptions>(options =>
{
// Filter out instrumentation of the Prometheus scraping endpoint.
options.Filter = ctx => ctx.Request.Path != "/metrics";
});


/************************************************************************************************/

// Add CORS policy
Expand Down
2 changes: 1 addition & 1 deletion tour-of-heroes-api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand All @@ -30,6 +29,7 @@
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.6.0-beta.3" />

<!-- Exporters -->
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.0.0" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.6.0" />
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.6.0-rc.1" />
Expand Down

0 comments on commit c08e94c

Please sign in to comment.