Skip to content

How to get Azure service fabric performance metrics #114

@TestUser0811

Description

@TestUser0811

Currently configured telemetry to Service Fabric service Service

     return new WebHostBuilder().UseHttpSys()
                        .ConfigureServices(
                            services => services
                                .AddSingleton<StatelessServiceContext>(serviceContext)
                                .AddSingleton<ServiceFabricAppContext>(new ServiceFabricAppContext(){
                                        NodeName = serviceContext.NodeContext.NodeName,
                                        ServiceHostIP=serviceContext.NodeContext.IPAddressOrFQDN,
                                        ServiceHostPort=FabricRuntime.GetActivationContext().GetEndpoints()[0].Port
                                } )
                                    .AddSingleton<ITelemetryInitializer>((serviceProvider) => 
    FabricTelemetryInitializerExtension.CreateFabricTelemetryInitializer(serviceContext))) // Azure Service Fabric Telemetry 
   Initializer
                        .UseContentRoot(Directory.GetCurrentDirectory())
                           .UseApplicationInsights()
                        .UseStartup<Startup>()
                        .UseEnvironment(environment)
                        .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.None)
                        .UseUrls(url)
                        .Build();

Below are additional packages added,

  <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric.Native" Version="2.1.1" /> 
   <PackageReference Include="Microsoft.ServiceFabric.Diagnostics.Internal" Version="4.1.417" />

Right now under AzureApplicationInsights => logs, only "requests" table having data where as other required tables especially "performanceCounters" is empty.

What needs to be done/configured, so that already wired Azure Application insights instance can record performance Counters details like CPU, memory etc of existing service fabric nodes, which are hosting .Net Core 2.1 Web Api application?

Sampling not enabled from Azure portal.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions