Application Insights - Application Map of Function reading from service bus queue

Viewed 410

I'm playing around with the Application Map feature of Application Insights and I'm struggling to generate what I expected to see.

I have a "Sender" (HTTP Trigger Azure Function) that writes to a Service Bus Queue via a binding, and a "Receiver" (Service Bus Trigger Azure Function) that reads from the same queue.

I was expecting to see an Application Map that is something like:

Sender -> Service Bus -> Receiver

But I'm struggling. The sending bit seems to work out of the box, as I get:

Image showing Sender -> Service Bus

Unfortunately I'm unable to generate an arrow that leaves the Service Bus. I've tried putting the receiver in a separate project to the sender, as well as the receiver using a separate App Insights resource. This latter attempt just gave me two different app insights to read and all I can see if the function being executed.

https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-end-to-end-tracing?tabs=net-standard-sdk-2#trace-message-processing suggests it's possible in normal .NET code. But I can't find an equivalent resource for functions.

Is what I'm expecting possible?

2 Answers

Does this work if you disable the preview mode in Application Map? If so, it might be because you need to send more than just 1 call at a time. The preview mode requires that you send data for more than 1 minute on a new Application Insights resource. I tried an out-of-the-box solution using C# Script and it looks like correlation should work at least with Service Bus extension version: Microsoft.Azure.WebJobs.Extensions.ServiceBus 4.2.1 (from the default Functions 2.0 extension bundle).

Related