Open gunzip opened 4 years ago
Hi, we are experiencing SNAT port exhaustion as well when using the TelemetryClient in Azure functions v2 Java runtime. And are wondering about the exact same things as described in the question above for the Java runtime.
The AI client used by the runtime is a C# client, so a different instance altogether.
if not, is there a way to get / configure the internal AI client in JS functions ?
I don't believe so but @brettsam would know best!
For issues around SNAT port exhaustion, our general guidance is outlined here, but it seems like @gunzip may have still been running into issues despite using a singleton? Wondering if you found a resolution? (Again sorry about the delay in response!)
Azure functions v2 NodeJS runtime
Question
Hi @brettsam, I read here that with C# runtime you can get the internal AI client.
I've read the docs abot the NodeJS runtime, but I cannot find an answer to some questions related to AI client instantiation:
1)
2)applicationInsights.defaultClient
is a singleton across all functions that belong to the same functionapp service ?if it is a singleton, when I call3) how doessetup()
in one functions, I'm overriding the configuration of all clients for every other function ?applicationInsights.defaultClient
relate to the internal ai client used by the function runtime ? when I callsetup()
on this client, does it affect the internal client as well ? 4) if not, is there a way to get / configure the internal AI client in JS functions ?I'm mostly asking because we're experiencing SNAT port exhaustion and we want to try passing a custom http agent to the AI client (but there are other use cases as well).
Thank you in advance for any answer !
(I've answered 1 & 2 myself and it looks like the answer is yes to both)