We came up with our own integration, including support for dependency tracking and Live Metrics flow.
Basically, what you need to do is manually add the necessary dependency and performance collectors of Application Insights to the application as follows:
var configuration = new TelemetryConfiguration() { InstrumentationKey = aiKey }; var module = new DependencyTrackingTelemetryModule(); module.Initialize(configuration); QuickPulseTelemetryProcessor processor = null; configuration.TelemetryProcessorChainBuilder .Use(next => { processor = new QuickPulseTelemetryProcessor(next); return processor; }) .Build(); var quickPulse = new QuickPulseTelemetryModule(); quickPulse.Initialize(configuration); quickPulse.RegisterTelemetryProcessor(processor);
Then, in order to log and match requests from your external services and your backend services with state / state support, you need to intercept calls to SF services based on the instructions of this message: How to add a message header to the request when using the default client for the Azure network?
Web Api requests can be logged in Application Insights using special software Middleware, which is not so difficult to write.
We have created a code repository that describes a working example, which can be found here at https://github.com/DeHeerSoftware/Azure-Service-Fabric-Logging-And-Monitoring
There is a lot of code to integrate everything, so please take a look at the provided repository. This will give you a starting point.


source share