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 (ARM template) for your Azure Service Fabric cluster. Get a template that installs Azure Diagnostics on a Service Fabric cluster.
In this article, you:
- Add the Application Insights Profiler property to your ARM 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
- Profiler supports .NET Framework and .NET applications.
- Verify you're using .NET Framework 4.6.2 or later.
- Confirm that the deployed OS is
Windows Server 2012 R2
or later.
- An Azure Service Fabric managed cluster.
Create a deployment template
In your Service Fabric managed cluster, go to where you implemented the ARM template.
Locate the
WadCfg
tags in the Azure Diagnostics extension in the deployment template file.Add the following
SinksConfig
section as a child element ofWadCfg
. Replace theApplicationInsightsProfiler
property value with your own Application Insights instrumentation key:"settings": { "WadCfg": { "SinksConfig": { "Sink": [ { "name": "MyApplicationInsightsProfilerSinkVMSS", "ApplicationInsightsProfiler": "YOUR_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY" } ] }, }, }
For information about how to add 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 you update WadCfg
with your instrumentation key, deploy your Service Fabric cluster.
Application Insights Profiler is 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.
- For stateless APIs: See the instructions for tracking requests for profiling.
- For tracking custom operations in other kinds of apps: See Track custom operations with Application Insights .NET SDK.
After you enable Application Insights, redeploy your application.
Generate traffic and view Profiler traces
- Launch an availability test to generate traffic to your application.
- Wait 10 to 15 minutes for traces to be sent to the Application Insights instance.
- View the Profiler traces via the Application Insights instance in the Azure portal.
Next steps
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.
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про