|
1 | 1 | ---
|
2 |
| -title: Profile live Azure Service Fabric apps with Application Insights |
3 |
| -description: Enable Profiler for a Service Fabric application |
| 2 | +title: Enable Profiler for Azure Service Fabric applications |
| 3 | +description: Profile live Azure Service Fabric apps with Application Insights |
4 | 4 | ms.topic: conceptual
|
5 | 5 | ms.custom: devx-track-dotnet
|
6 |
| -ms.date: 08/06/2018 |
7 |
| -ms.reviewer: jogrima |
| 6 | +ms.date: 06/23/2022 |
8 | 7 | ---
|
9 | 8 |
|
10 |
| -# Profile live Azure Service Fabric applications with Application Insights |
| 9 | +# Enable Profiler for Azure Service Fabric applications |
11 | 10 |
|
12 |
| -You can also deploy Application Insights Profiler on these services: |
13 |
| -* [Azure App Service](profiler.md?toc=/azure/azure-monitor/toc.json) |
14 |
| -* [Azure Cloud Services](profiler-cloudservice.md?toc=/azure/azure-monitor/toc.json) |
15 |
| -* [Azure Virtual Machines](profiler-vm.md?toc=/azure/azure-monitor/toc.json) |
| 11 | +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](https://github.com/Azure/azure-docs-json-samples/blob/master/application-insights/ServiceFabricCluster.json). |
16 | 12 |
|
17 |
| -## Set up the environment deployment definition |
| 13 | +In this article, you will: |
18 | 14 |
|
19 |
| -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](https://github.com/Azure/azure-docs-json-samples/blob/master/application-insights/ServiceFabricCluster.json). |
| 15 | +- Add the Application Insights Profiler property to your Azure Resource Manager template. |
| 16 | +- Deploy your Service Fabric cluster with the Application Insights Profiler instrumentation key. |
| 17 | +- Enable Application Insights on your Service Fabric application. |
| 18 | +- Redeploy your Service Fabric cluster to enable Profiler. |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +- Profiler supports .NET Framework, .NET Core, and .NET Core [LTS](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) and newer applications. |
| 23 | + - Verify you're using [.NET Framework 4.6.1](/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed) or later. |
| 24 | + - Confirm that the deployed OS is `Windows Server 2012 R2` or later. |
| 25 | +- [An Azure Service Fabric managed cluster](../../service-fabric/quickstart-managed-cluster-portal.md). |
20 | 26 |
|
21 |
| -To set up your environment, take the following actions: |
| 27 | +## Create deployment template |
22 | 28 |
|
23 |
| -1. Profiler supports .NET Framework and .Net Core. If you're using .NET Framework, make sure you're using [.NET Framework 4.6.1](/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed) or later. It's sufficient to confirm that the deployed OS is `Windows Server 2012 R2` or later. Profiler supports .NET Core [LTS](https://dotnet.microsoft.com/platform/support/policy/dotnet-core) and newer applications. |
| 29 | +1. In your Service Fabric managed cluster, navigate to where you've implemented the [Azure Resource Manager template](https://github.com/Azure/azure-docs-json-samples/blob/master/application-insights/ServiceFabricCluster.json). |
24 | 30 |
|
25 |
| -1. Search for the [Azure Diagnostics](../agents/diagnostics-extension-overview.md) extension in the deployment template file. |
| 31 | +1. Locate the `WadCfg` tags in the [Azure Diagnostics](../agents/diagnostics-extension-overview.md) extension in the deployment template file. |
26 | 32 |
|
27 | 33 | 1. Add the following `SinksConfig` section as a child element of `WadCfg`. Replace the `ApplicationInsightsProfiler` property value with your own Application Insights instrumentation key:
|
28 | 34 |
|
29 |
| - ```json |
30 |
| - "SinksConfig": { |
31 |
| - "Sink": [ |
32 |
| - { |
33 |
| - "name": "MyApplicationInsightsProfilerSink", |
34 |
| - "ApplicationInsightsProfiler": "00000000-0000-0000-0000-000000000000" |
35 |
| - } |
36 |
| - ] |
37 |
| - } |
38 |
| - ``` |
| 35 | + ```json |
| 36 | + "settings": { |
| 37 | + "WadCfg": { |
| 38 | + "SinksConfig": { |
| 39 | + "Sink": [ |
| 40 | + { |
| 41 | + "name": "MyApplicationInsightsProfilerSinkVMSS", |
| 42 | + "ApplicationInsightsProfiler": "YOUR_APPLICATION_INSIGHTS_INSTRUMENTATION_KEY" |
| 43 | + } |
| 44 | + ] |
| 45 | + }, |
| 46 | + }, |
| 47 | + } |
| 48 | + ``` |
| 49 | + |
| 50 | + 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](../../virtual-machines/extensions/diagnostics-template.md). |
| 51 | + |
| 52 | +## Deploy your Service Fabric cluster |
| 53 | + |
| 54 | +After updating the `WadCfg` with your instrumentation key, deploy your Service Fabric cluster. |
| 55 | + |
| 56 | +Application Insights Profiler will be installed and enabled when the Azure Diagnostics extension is installed. |
| 57 | + |
| 58 | +## Enable Application Insights on your Service Fabric application |
39 | 59 |
|
40 |
| - 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](../../virtual-machines/extensions/diagnostics-template.md?toc=/azure/virtual-machines/windows/toc.json). |
| 60 | +For Profiler to collect profiles for your requests, your application must be tracking operations with Application Insights. |
41 | 61 |
|
42 |
| -1. Deploy your Service Fabric cluster by using your Azure Resource Manager template. |
43 |
| - If your settings are correct, Application Insights Profiler will be installed and enabled when the Azure Diagnostics extension is installed. |
| 62 | +- **For stateless APIs**, you can refer to instructions for [tracking requests for profiling](./profiler-trackrequests.md). |
| 63 | +- **For tracking custom operations in other kinds of apps**, see [track custom operations with Application Insights .NET SDK](../app/custom-operations-tracking.md). |
44 | 64 |
|
45 |
| -1. Add Application Insights to your Service Fabric application. |
46 |
| - For Profiler to collect profiles for your requests, your application must be tracking operations with Application Insights. For stateless APIs, you can refer to instructions for [tracking Requests for profiling](profiler-trackrequests.md?toc=/azure/azure-monitor/toc.json). For more information about tracking custom operations in other kinds of apps, see [track custom operations with Application Insights .NET SDK](../app/custom-operations-tracking.md). |
| 65 | +Redeploy your application once you've enabled Application Insights. |
47 | 66 |
|
48 |
| -1. Redeploy your application. |
| 67 | +## Generate traffic and view Profiler traces |
49 | 68 |
|
| 69 | +1. Launch an [availability test](../app/monitor-web-app-availability.md) to generate traffic to your application. |
| 70 | +1. Wait 10 to 15 minutes for traces to be sent to the Application Insights instance. |
| 71 | +1. View the [Profiler traces](./profiler-overview.md) via the Application Insights instance the Azure portal. |
50 | 72 |
|
51 | 73 | ## Next steps
|
52 | 74 |
|
53 |
| -* Generate traffic to your application (for example, launch an [availability test](../app/monitor-web-app-availability.md)). Then, wait 10 to 15 minutes for traces to start to be sent to the Application Insights instance. |
54 |
| -* See [Profiler traces](profiler-overview.md?toc=/azure/azure-monitor/toc.json) in the Azure portal. |
55 |
| -* For help with troubleshooting Profiler issues, see [Profiler troubleshooting](profiler-troubleshooting.md?toc=/azure/azure-monitor/toc.json). |
| 75 | +For help with troubleshooting Profiler issues, see [Profiler troubleshooting](./profiler-troubleshooting.md). |
56 | 76 |
|
57 |
| -[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)] |
| 77 | +[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)] |
0 commit comments