Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

feat(LightTelemetry): adds TrackException to interface #217

Merged

Conversation

bruno-brant
Copy link
Contributor

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
Copy link
Contributor Author

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.

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 bruno-brant force-pushed the feature/159-add-trackexception-to-lighttelemetry branch from 7f6ba39 to df4a162 Compare February 26, 2020 17:33
@guilhermeluizsp guilhermeluizsp merged commit 9407113 into master Feb 28, 2020
@guilhermeluizsp guilhermeluizsp deleted the feature/159-add-trackexception-to-lighttelemetry branch February 28, 2020 01:39
bavanade added a commit that referenced this pull request Apr 16, 2020
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ILightTelemetry doesn't have a method to track exceptions
2 participants