ASP.NET Core Attributes and Middleware

Use Attributes & Middleware in ASP.NET Core for Logging, Telemetry, and Anything Else

Every once in a while you need to add telemetry, logging, or metrics. While necessary, writing this code along with the business logic feels kind of wrong. In these cases, you can utilize attributes and ASP.NET Core middleware.