DavidAJohn / FotoStorioMicroservices

.NET application built using a microservice architecture with Docker containers. Includes a Blazor WebAssembly e-commerce store with Stripe Elements payment integration.
23 stars 4 forks source link

Serilog and Seq #1

Closed DavidAJohn closed 1 year ago

DavidAJohn commented 2 years ago

An addition that I'd like to make to the application is to add Serilog to at least some of the services - definitely to the Ordering API and the Products API at least.

This would probably only need a few additional nuget packages and perhaps some minor alterations to the logging statements. Sinks for the console and Seq would likely be sufficient.

I'll then add a Seq container instance to the application based on the official Docker image.

DavidAJohn commented 1 year ago

I've added Serilog to the Products Aggregator (although without a Seq sink for now), because I felt it was important to be able to see what's happening when lists of products with discounts are being returned, particularly to see if it becomes a bottleneck.

DavidAJohn commented 1 year ago

A Seq container has now been added to docker compose, in this commit: 609d371b23740b50ab63b6de6cf015d9e690ed60

DavidAJohn commented 1 year ago

And the Product Aggregator now writes logs to Seq as well, as per this commit: ba08f03b60b6e737e2d4861663ae2af51a58a1a4

DavidAJohn commented 1 year ago

Both the Ordering API and Products API projects are now logging to the Seq instance using Serilog.

Although I may add Serilog to some of the other projects, the vital backend ones are now covered, so I'll close the issue.