How to use correlation IDs in ASP.NET Core MVC

1 Year Subscription

Suppose you have implemented an application based on a microservices architecture. In a microservices-based application, you’ll typically have a conglomeration of several services. One of the significant benefits of microservices architecture is that each service is built, deployed, and maintained independently, promoting high scalability.

But let’s say something goes wrong. How would you identify, by looking at the logs, where the request failed? Your log files might include hundreds of thousands or perhaps millions of log messages. Hence searching through the log entries would be a daunting task. This is where correlation IDs come to the rescue.

In a previous article here, I talked about the basics of correlation IDs and how you can work with them in ASP.NET Web API. In this article we’ll examine how we can work with correlation IDs in ASP.NET Core.

To work with the code examples provided in this article, you should have Visual Studio 2019…



UCSD DevOps CICD

Continue reading on source link

Leave a Comment

Your email address will not be published. Required fields are marked *

21 + = 28