Zimmergren/LogAnalytics.Client

Make LogAnalyticsClient dependency injection friendly.

Closed this issue · 2 comments

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.

Thanks for the contribution, @skalahonza 👏 🎉