testcontainers-dotnet icon indicating copy to clipboard operation
testcontainers-dotnet copied to clipboard

Add Seq Module

Open montanehamilton opened this issue 1 year ago • 6 comments

What does this PR do?

New module to support the Seq logging server.

Why is it important?

Another module to make it easy for developers needing Seq to get testing quickly.

How to test this PR

Automated test added to demonstrate the Seq server accepts logs and that those logs can be read via the API.

montanehamilton avatar Oct 08 '24 21:10 montanehamilton

Deploy Preview for testcontainers-dotnet ready!

Name Link
Latest commit 8cad0fb19c7ab2b462bae0822a2b47881513b1c1
Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/67462bf3b6839300080d84eb
Deploy Preview https://deploy-preview-1276--testcontainers-dotnet.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 08 '24 21:10 netlify[bot]

Very glad you have PRed this in it was on my list of ones to do if someone hadn't :)

TechLiam avatar Oct 10 '24 17:10 TechLiam

👋🏻 G'Day @montanehamilton ,

question: what is the use case for having Seq in a TC? I use Seq all the time .. love it! but ... I've never seen a use for it as a test container?

I'm really curious to learn why.

PureKrome avatar Nov 26 '24 14:11 PureKrome

👋🏻 G'Day @montanehamilton ,

question: what is the use case for having Seq in a TC? I use Seq all the time .. love it! but ... I've never seen a use for it as a test container?

I'm really curious to learn why.

Logging is a requirement and ensuring applications can actually log and that those logs actually get to the logging provider, in this case Seq, is a nice, automated test to have. Maintaining a library that has additional logic in a custom Seq client means one should make sure it actually works against the target provider.

montanehamilton avatar Nov 26 '24 14:11 montanehamilton

Logging is a requirement and ensuring applications can actually log and that those logs actually get to the logging provider

Hmm .. ok. So if I'm reading this correctly, you're testing that your logging configuration (to seq) is correct? Or you're testing either the MS-Logging to Serilog-Logging method you're using to log .. works?

PureKrome avatar Nov 26 '24 15:11 PureKrome

Logging is a requirement and ensuring applications can actually log and that those logs actually get to the logging provider

Hmm .. ok. So if I'm reading this correctly, you're testing that your logging configuration (to seq) is correct? Or you're testing either the MS-Logging to Serilog-Logging method you're using to log .. works?

Implicitly we're "testing" those perhaps but the point is to ensure the values we expect on our logs get logged. We're really testing how we're using those methods and doing an automated integration test to assert it's all working correctly and we're sending the expected properties.

No different to using a database container to run an integration test for our application even though we use Entity Framework or Dapper. Regardless of them "working" how you use them matters.

montanehamilton avatar Nov 26 '24 16:11 montanehamilton