dotnet / dotnet/aspnetcore

Log scope for Minimal APIs

Open
#35,223 2 comments 0 reactions 0 assignees View on GitHub
area-minimal feature-minimal-actions
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### 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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.