dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.42k stars 10.01k forks source link

Log scope for Minimal APIs #35223

Open Kahbazi opened 3 years ago

Kahbazi commented 3 years ago

Is your feature request related to a problem? Please describe.

Provide log scope for minimal APIs, the same as it is currently exists in MVC.

https://github.com/dotnet/aspnetcore/blob/8b30d862de6c9146f466061d51aa3f1414ee2337/src/Mvc/Mvc.Core/src/Infrastructure/ResourceInvoker.cs#L112

Describe the solution you'd like

Create a log scope with endpoint name from IEndpointNameMetadata.EndpointName in created RequestDelegate.

Additional context

This could also be done in EndpointRoutingMiddleware which would cover all frameworks which are built on IEndpointRouteBuilder.

davidfowl commented 3 years ago

I think the value is low here and there's additional overhead for little value. Especially because most of the time there's no endpoint name metadata.

ghost commented 3 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.