none
How App Insights trace the data flow? RRS feed

  • Question

  • Hi guys, I am new to the App Insights and Azure overall.

    For now I'm trying to trace the data between different Function Apps using App Insight.

    However I came to a problem where I do not know how App Insight keep the relationships between different Function Apps.

    For example I have Function App A and B, my data will go thru A first then to some Service Bus then to B. 

    How App Insights knows that the data that goes to B is the same data that went to A? Because when I checked the logs, they do not share the same ID nor operation ID. 

    Thanks if anyone could help with this. 

    Friday, August 16, 2019 4:09 AM

All replies

  • Hello Corene95,

    Application Insights will do it's best to track the correlation between different Functions, but currently this only works with HTTP requests. Tracing a process through queues and other services requires some manual configuration on your part as it will be specific to your system. 

    There are a couple general strategies for this. One is to set the Parent Id in Function B to the Activity Id of Function A. This replicates how App Insights traces HTTP requests through a system, so it keeps things consistent in that respect. The other is to set the Operation Id or a Correlation Id so that it stays the same throughout the process. Either strategy will let you trace the relationships, so which one you choose is primarily based on preference and what works best with any other logging systems you are using.

    Friday, August 16, 2019 3:06 PM
    Moderator