Make LogAnalyticsClient dependency injection friendly.
Closed this issue · 2 comments
skalahonza commented
It would be great if the LogAnalyticsClient could be registered in the dependency injection container. Also, creating new Http Client on your own is not a good practice. One can easily reuse HttpMessageHandler thanks to pooling: https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests
It should be also possible to load workspaceId and sharedKey from configuration or IOptions interface.
skalahonza commented
PR: #29
Zimmergren commented
Thanks for the contribution, @skalahonza 👏 🎉