ava-innersource / Liquid-Application-Framework-1.0-deprecated

Liquid is a framework to speed up the development of microservices
MIT License
25 stars 14 forks source link

feat(LightTelemetry): adds TrackException to interface #217

Closed bruno-brant closed 4 years ago

bruno-brant commented 4 years ago

ILightTelemetry lacked the TrackException method. This was done by design - to avoid consumer code to call TrackException, it seems, because exception handling was supposed to be done at framework level.

Our take is that this creates more problems than solves. Consumers will still be able to directly use LightTelemetry if they desire, or handle the exception and NOT call TrackException when they should.

Also, that meant a lot of violations of LSP in the framework code, and led to numerous issues during testing since it was impossible to mockout the LightTelemetry.TrackEvent dependency.

This commit adds the method and removes all LSP violations that I could find.

Closes #159.

bruno-brant commented 4 years ago

I had to advance this in order to improve testing on #197. It's a simple improvement, so I think we can approve it now.