Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insight correlating requests across services and queues

I understand that I could use the clienttrackid and setting this in a header, but I'm unsure of what is handle by application insights / azure and what I need to to manually. This is the case (I would like to see logs from ServiceA, FunctionA, ServiceB as related events) :

  • Clientapp calls ServiceA
  • ServicesA adds a message to a queue
  • FunctionA triggers by the queue, and calls ServiceB

Do I need to add the tracking id to the message I add to the queue? Or is everything handled automagically?

Thanks Larsi

like image 466
Larsi Avatar asked Feb 14 '18 08:02

Larsi


1 Answers

There is an Application Insights pattern for correlation - see this link

However, often a business transaction spans the scope of many services and technologies and it is useful to be able to correlate across these. Define correlation ID's at the business transaction level and then flow this correlation ID across the entire solution, some of the solution may include Application Insights, data stores and other logging and diagnostics. Unfortunately this is a manual process and takes some thinking through but the benefits in tracking and debugging quickly outweigh the additional time spent on this "plumbing".

like image 191
Murray Foxcroft Avatar answered Sep 28 '22 00:09

Murray Foxcroft