Skip to content

Investigate if OOB metrics from ASP.NET Core and HttpClient can be enabled from instrumentation libraries #1753

@vishweshbankwar

Description

@vishweshbankwar

.NET8.0 added OOB support for metrics in ASP.NET Core and HttpClient that aligns with OpenTelemetry semantic conventions. Needs further investigation to check if the instrumentation libraries can be updated to enable these by adding AddMeter in .NET8.0 onwards. Things we need to check

  1. What will be the experience when users upgrade their target framework to .NET8.0 from lower versions? Will there be significant difference in terms of metric dimensions, request duration value etc.?
  2. There are multiple metrics that are emitted from a single meter, e.g. from Microsoft.AspNetCore.Hosting, there are two metrics that are emitted http.server.active_requests and http.server.request.duration. Only http.server.request.duration is part of stability plan. How do we handle non-stable metrics that are emitted? As it cannot be part of stable instrumentation library release.
  3. Semantic conventions are in feature freeze, how would we handle the changes if .NET8.0 is released before stable release of semantic conventions?
  4. How do we handle Enrich/Filter. At present, Asp.Net Core instrumentation offers this for metrics, and .NET also has some mechanism to enrich. Need to ensure a smooth experience for enrich/filter exists. Update 10/6: Follow Enrich and Filter support for metrics [ASP.NET Core] and [HttpClient] #1733

NOTE: This is the initial list of things, may add more as we go through the investigation.

Reference PRs
HttpClient
https://github.com/dotnet/runtime/pull/89809/files
dotnet/runtime#87319

ASP.NET Core
dotnet/aspnetcore#48375
dotnet/aspnetcore#46834

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions