onebeyond / monaco

Template for .NET projects
MIT License
38 stars 10 forks source link

FEATURE: Improve logging, tracing and observability by implementing OpenTelemetry and Seq #83

Open CesarD opened 3 weeks ago

CesarD commented 3 weeks ago

Detailed Description

Improve logging, tracing and observability by implementing OpenTelemetry and include Seq as an optional sink for local development environment.

Context

Monaco already has some basic logging implemented, but it still requires further improvement to make its observability, tracing and instrumentation better and here is where implementing OpenTelemetry could do wonders. Also, it will help a lot by the time Aspire is implemented into the template, which also requires OpenTelemetry. Finally, leveraging Seq for local development environments could help a lot to track logs, traces and metrics without having to dive into text logs and helps a lot with the troubleshooting.

Possible Implementation

There are Serilog packages for implementing both OpenTelemetry and Seq as sink, so it should only be required to keep improving the current Serilog configuration.

Gonzo345 commented 3 weeks ago

Just asking: would this be implemented through Aspire? Seq for production environments implies costs but using it locally is quite useful and easy to implement with Aspire

CesarD commented 3 weeks ago

No, as I was saying, this is separate and in preparation for when we finally implement Aspire... But so far is mainly for having OpenTelemetry in general and Seq just as an option for local development environment (we could discuss if we want it to opt-in or opt-out).