I am creating an application consisting of several micro Services that run on Azure Service Fabric on Premises. I will host this on Windows Servers.
What is the recommended way for doing logging? I read something about using Event Tracing for Windows (ETW). Should I use this? How would I collect the logging data centrally?
Or should I use ASP.NET MVC Core Logging and save the loggs to a central fileshare?
You could use Azure Diagnostics EventFlow to pick up ETW events generated by you Service Dabric services. By using (and adding custom events to) the Service/ActorEventSources prepared for you in new SF services you can log ETW events from your services on top of the ETW events that the underlying Service Fabric framework gemerates.
In EventFlow you can then setup your inputs (the ETW events) and your output for these. You could here choose an output that fits you. For instance, if you are running on-prem and have an Elastic setup you could route your ETW events to that and make them searchable there. You can also extend EventFlow with your own output if you want to log to your own database for instance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With