Testing Application Insights with Java to Test Azure Function Concurrency

Let’s say you want to know how many function instances are calling your DB or Java Service. This generated some discussion on the issues page for the Azure Functions Service Bus configuration documentation. Here:
https://github.com/MicrosoftDocs/azure-docs/issues/35057#issuecomment-513083471

To do so, I suggest using Application Insights.

See my code here for how to make this possible using Java and the queries made with Application Insights to get these results:
https://github.com/timmyreilly/ServiceBusJavaAppInsights

The results of the test are here: https://user-images.githubusercontent.com/8118355/61508915-f31aeb80-a9a0-11e9-82b0-cbbbb2da1f28.png

My next steps include doing more testing and finding if I can hit upper limits for scaling, but I’m afraid that might cost a lot…

Here’s a photo from Big Rec fields as people play Goalty in the background: