This chapter covers:
- Monitoring in a microservice system
- Exploring structured logging
- Distributed tracing across microservices
- Logging unhandled exceptions
In this chapter, you’ll start to learn how ASP.NET Core helps us tackle some important cross—cutting concerns: monitoring, logging, and tracing. All three are needed across all microservices, and they play an important role in making a microservice system operations-friendly. Once your system is in production, you need to know whether all your microservices are up, which is why you need to monitor them. In addition, as discussed in chapter 7, you need good logging to be able to diagnose the system.
Here, you’ll configure middleware in the context of one microservice. Then, in chapter 12, you’ll take that configuration and put it into NuGet packages, ready to be reused easily across all your microservices.