Enable Profiler for Azure Service Fabric applications

Application Insights Profiler is included with Azure Diagnostics. You can install the Azure Diagnostics extension by using an Azure Resource Manager template for your Service Fabric cluster. Get a template that installs Azure Diagnostics on a Service Fabric Cluster.

In this article, you will:

  • Add the Application Insights Profiler property to your Azure Resource Manager template.
  • Deploy your Service Fabric cluster with the Application Insights Profiler instrumentation key.
  • Enable Application Insights on your Service Fabric application.
  • Redeploy your Service Fabric cluster to enable Profiler.

Prerequisites

Create deployment template

  1. In your Service Fabric managed cluster, navigate to where you've implemented the Azure Resource Manager template.

  2. Locate the WadCfg tags in the Azure Diagnostics extension in the deployment template file.

  3. Add the following SinksConfig section as a child element of WadCfg. Replace the ApplicationInsightsProfiler property value with your own Application Insights instrumentation key:

"settings": {
    "WadCfg": {
        "SinksConfig": {
            "Sink": [
                {
                    "name": "MyApplicationInsightsProfilerSinkVMSS",
                    "ApplicationInsightsProfiler": "YOUR_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY"
                }
            ]
        },
    },
}  

For information about adding the Diagnostics extension to your deployment template, see Use monitoring and diagnostics with a Windows VM and Azure Resource Manager templates.

Deploy your Service Fabric cluster

After updating the WadCfg with your instrumentation key, deploy your Service Fabric cluster.

Application Insights Profiler will be installed and enabled when the Azure Diagnostics extension is installed.

Enable Application Insights on your Service Fabric application

For Profiler to collect profiles for your requests, your application must be tracking operations with Application Insights.

Redeploy your application once you've enabled Application Insights.

Generate traffic and view Profiler traces

  1. Launch an availability test to generate traffic to your application.
  2. Wait 10 to 15 minutes for traces to be sent to the Application Insights instance.
  3. View the Profiler traces via the Application Insights instance the Azure portal.

Next steps

Learn how to...

Note

On March 31, 2025, support for instrumentation key ingestion will end. Instrumentation key ingestion will continue to work, but we'll no longer provide updates or support for the feature. Transition to connection strings to take advantage of new capabilities.