Alex Gordon
Alex Gordon

Reputation: 60751

how to do distributed tracing / tracking with application insights

I'm using several resources in Azure, and the flow looks like this:

  1. get file from sftp
  2. enrich file with data from http call
  3. put messages on a queue
  4. process messages
  5. make some external calls
  6. deliver data

How do we trace where a specific 'run' is in the above process?

Can we simply create a guid and pass it into app insights?

Upvotes: 1

Views: 1684

Answers (1)

Bhargavi Annadevara
Bhargavi Annadevara

Reputation: 5502

This is indeed a perfect scenario for Distributed tracing!

There are two main methods of handling this data, using the Transaction Diagnostics view, or the Application Map view. The former helps find perfomance issues on a per request basis, while the latter offers a topological view of the interaction between various systems.

Most of the dependencies are auto-collected by the Application Insights SDK, as it supports distributed tracing natively through dependency auto-collectors, but you can also use the TrackDependency API to track them manually.

Coming to correlating telemetry, the guid that you suggested takes the form of operation_Id, that associates telemetry with the logical operation performed. To know more about how this works under the hood, please take a look at Telemetry correlation in Application Insights.

For additional reading, there is also a neat blog post here illustrating the same with an example.

Hope this helps!

Upvotes: 5

Related Questions