I have function app that iterates over log files and sends them to Azure Log Analytics using this sample here: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-collector-api#c-sample
The problem is that I have many logs, so many instances of HttpClient are created, which causes "An attempt was made to access a socket in a way forbidden by its access permissions. ---> System.Net.Sockets.SocketException" error.
I know that is a better practice to create a static instance of HttpClient, but since such instance needs a different signature for each log in my case, its not possible.
Any ideas how can I overcome this error?