Information about applications in service fabric?

I need to add performance logging in the Azure Service Fabric application that I am developing. I tried to follow the following guide, which seems pretty simple and easy:

https://github.com/Microsoft/azure-content/blob/master/articles/service-fabric/service-fabric-diagnostics-application-insights-setup.md

However, I cannot find the Microsoft.ServiceFabric.Telemetry.ApplicationInsights package on NuGet. Since this article from last year, everything may have changed quite a bit, but I'm not sure that the Insights setting for the Azur Service Fabric application is very different from any ASP.Net application (I can assume from the article, which may be a bit different) .

Can someone point me in the right direction, how to do it right?

Thanks.

+2
source share
3 answers

The NuGet package is here: https://www.nuget.org/packages/Microsoft.ServiceFabric.Telemetry.ApplicationInsights/

Be sure to customize your search to enable Pre-Order packages.

+3
source

The package can still be installed using the package manager console:

 Install-Package Microsoft.ServiceFabric.Telemetry.ApplicationInsights -Pre -Version 0.3.193-preview2 

However, see the important note: "The owner has blocked this package. This may mean that the package is outdated or should no longer be used."

https://www.nuget.org/packages/Microsoft.ServiceFabric.Telemetry.ApplicationInsights/

It seems that these are still very early days in this integration. In addition, all he is currently doing is tracing ETW events to App Insights.

0
source

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.

live metrics flow

Dependency tracking

0
source

Source: https://habr.com/ru/post/1257708/


All Articles