Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
414 views
in Technique[技术] by (71.8m points)

azure - Track method execution time in worker service with application insight custom metric

I am looking for to track multiple methods(A=>B=>C) execution time with application insight custom metric. From the Doc I can get the execution stats for the main worker process, but is there any way I can also get the execution time of dependency methods calls also in application insight ?

question from:https://stackoverflow.com/questions/65871907/track-method-execution-time-in-worker-service-with-application-insight-custom-me

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As mentioned in the same doc, dependency collection is enabled by default. While there are many dependencies that are automatically collected, you can still track one manually with a TrackDependency call if it isn't auto-collected.

App Insights measures the duration of dependency calls, whether its failing or not, along with additional information like name of dependency and so on. The collected data can be found in Application Map, Transaction diagnostics, or queried from Log Analytics.

Example:

Example

This should enable you to investigate specific dependency calls and also correlate them to requests and exceptions. Dependency Tracking in Azure Application Insights is explained in great detail in this article.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...