Skip to content

Commit 8a3477a

Browse files
committed
Fixing deleted
added files
1 parent e5e6869 commit 8a3477a

File tree

2 files changed

+143
-76
lines changed

2 files changed

+143
-76
lines changed
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
title: Azure Service Fabric Diagnose Common Scenarios
3+
description: Learn about troubleshooting common monitoring and diagnostic scenarios within Azure Service Fabric applications.
4+
ms.topic: how-to
5+
ms.author: tomcassidy
6+
author: tomvcassidy
7+
ms.service: azure-service-fabric
8+
services: service-fabric
9+
ms.date: 09/29/2025
10+
# Customer intent: "As a cloud application administrator, I want to troubleshoot monitoring and diagnostic issues in Azure Service Fabric, so that I can ensure the performance and reliability of my applications."
11+
---
12+
13+
# Diagnose common scenarios with Service Fabric
14+
15+
This article illustrates common scenarios users have encountered in the area of monitoring and diagnostics with Service Fabric. The scenarios presented cover all three layers of service fabric: Application, Cluster, and Infrastructure. Each solution uses Application Insights and Azure Monitor logs, Azure monitoring tools, to complete each scenario. The steps in each solution give users an introduction on how to use Application Insights and Azure Monitor logs in the context of Service Fabric.
16+
17+
> [!WARNING]
18+
> Application Insights for the Service Fabric SDK is no longer supported.
19+
20+
## Prerequisites and Recommendations
21+
22+
The solutions in this article use the following tools. We recommend you have these set up and configured:
23+
24+
* [Application Insights with Service Fabric](service-fabric-tutorial-monitoring-aspnet.md)
25+
* [Enable Azure Diagnostics on your cluster](service-fabric-diagnostics-event-aggregation-wad.md)
26+
* [Set up a Log Analytics workspace](service-fabric-diagnostics-oms-setup.md)
27+
* [Log Analytics agent to track Performance Counters](service-fabric-diagnostics-oms-agent.md)
28+
29+
## How can I see unhandled exceptions in my application?
30+
31+
1. Navigate to your Application Insights resource that your application is configured with.
32+
2. Select *Search* in the top left. Then select filter on the next panel.
33+
34+
![AI Overview](media/service-fabric-diagnostics-common-scenarios/ai-search-filter.png)
35+
36+
3. You will see lots of types of events (traces, requests, custom events). Choose "Exception" as your filter.
37+
38+
![AI Filter List](media/service-fabric-diagnostics-common-scenarios/ai-filter-list.png)
39+
40+
By clicking an exception in the list, you can look at more details including the service context if you're using the Service Fabric Application Insights SDK.
41+
42+
![AI Exception](media/service-fabric-diagnostics-common-scenarios/ai-exception.png)
43+
44+
## How do I view which HTTP calls are used in my services?
45+
46+
1. In the same Application Insights resource, you can filter on "requests" instead of exceptions and view all requests made
47+
2. If you're using the Service Fabric Application Insights SDK, you can see a visual representation of your services connected to one another, and the number of succeeded and failed requests. On the left, select "Application Map"
48+
49+
![AI App Map Blade](media/service-fabric-diagnostics-common-scenarios/app-map-blade.png)
50+
![AI App Map](media/service-fabric-diagnostics-common-scenarios/app-map-new.png)
51+
52+
For more information on the application map, visit the [Application Map documentation](/azure/azure-monitor/app/app-map)
53+
54+
## How do I create an alert when a node goes down
55+
56+
1. Node events are tracked by your Service Fabric cluster. Navigate to the Service Fabric Analytics solution resource named **ServiceFabric(NameofResourceGroup)**
57+
2. Select the graph on the bottom of the blade titled "Summary"
58+
59+
![Azure Monitor logs solution](media/service-fabric-diagnostics-common-scenarios/oms-solution-azure-portal.png)
60+
61+
3. Here you have many graphs and tiles displaying various metrics. Select one of the graphs and it will take you to the Log Search. Here you can query for any cluster events or performance counters.
62+
4. Enter the following query. These event IDs are found in the [Node events reference](service-fabric-diagnostics-event-generation-operational.md#application-events)
63+
64+
```kusto
65+
ServiceFabricOperationalEvent
66+
| where EventID >= 25622 and EventID <= 25626
67+
```
68+
69+
5. Select "New Alert Rule" at the top and now anytime an event arrives based on this query, you'll receive an alert in your chosen method of communication.
70+
71+
![Azure Monitor logs New Alert](media/service-fabric-diagnostics-common-scenarios/oms-create-alert.png)
72+
73+
## How can I be alerted of application upgrade rollbacks?
74+
75+
1. On the same Log Search window as before, enter the following query for upgrade rollbacks. These event IDs are found under [Application events reference](service-fabric-diagnostics-event-generation-operational.md#application-events)
76+
77+
```kusto
78+
ServiceFabricOperationalEvent
79+
| where EventID == 29623 or EventID == 29624
80+
```
81+
82+
2. Select "New Alert Rule" at the top and now anytime an event arrives based on this query, you'll receive an alert.
83+
84+
## How do I see container metrics?
85+
86+
In the same view with all the graphs, you'll see some tiles for the performance of your containers. You need the Log Analytics Agent and [Container Monitoring solution](service-fabric-diagnostics-oms-containers.md) for these tiles to populate.
87+
88+
![Log Analytics Container Metrics](media/service-fabric-diagnostics-common-scenarios/containermetrics.png)
89+
90+
>[!NOTE]
91+
>To instrument telemetry from **inside** your container you will need to add the [Application Insights nuget package for containers](https://github.com/Microsoft/ApplicationInsights-servicefabric#microsoftapplicationinsightsservicefabric--for-service-fabric-lift-and-shift-scenarios).
92+
93+
## How can I monitor performance counters?
94+
95+
1. Once you have added the Log Analytics agent to your cluster, you need to add the specific performance counters you want to track. Navigate to the Log Analytics workspace’s page in the portal – from the solution’s page the workspace tab is on the left menu.
96+
97+
![Log Analytics Workspace Tab](media/service-fabric-diagnostics-common-scenarios/workspacetab.png)
98+
99+
2. Once you’re on the workspace’s page, Select “Advanced settings” in the same left menu.
100+
101+
![Log Analytics Advanced Settings](media/service-fabric-diagnostics-common-scenarios/advancedsettingsoms.png)
102+
103+
3. Select Data > Windows Performance Counters (Data > Linux Performance Counters for Linux machines) to start collecting specific counters from your nodes via the Log Analytics agent. Here are examples of the format for counters to add
104+
105+
* `.NET CLR Memory(<ProcessNameHere>)\\# Total committed Bytes`
106+
* `Processor(_Total)\\% Processor Time`
107+
108+
In the quickstart, VotingData and VotingWeb are the process names used, so tracking these counters would look like
109+
110+
* `.NET CLR Memory(VotingData)\\# Total committed Bytes`
111+
* `.NET CLR Memory(VotingWeb)\\# Total committed Bytes`
112+
113+
![Log Analytics Perf Counters](media/service-fabric-diagnostics-common-scenarios/omsperfcounters.png)
114+
115+
4. This allows you to see how your infrastructure is handling your workloads, and set relevant alerts based on resource utilization. For example – you might want to set an alert if the total Processor utilization goes above 90% or below 5%. The counter name you would use for this is “% Processor Time.” You could do this by creating an alert rule for the following query:
116+
117+
```kusto
118+
Perf | where CounterName == "% Processor Time" and InstanceName == "_Total" | where CounterValue >= 90 or CounterValue <= 5.
119+
```
120+
121+
## How do I track performance of my Reliable Services and Actors?
122+
123+
To track the performance of Reliable Services or Actors in your applications, you should collect the Service Fabric Actor, Actor Method, Service, and Service Method counters as well. Here are examples of reliable service and actor performance counters to collect
124+
125+
>[!NOTE]
126+
>Service Fabric performance counters cannot be collected by the Log Analytics agent currently, but can be collected by [other diagnostic solutions](service-fabric-diagnostics-partners.md)
127+
128+
* `Service Fabric Service(*)\\Average milliseconds per request`
129+
* `Service Fabric Service Method(*)\\Invocations/Sec`
130+
* `Service Fabric Actor(*)\\Average milliseconds per request`
131+
* `Service Fabric Actor Method(*)\\Invocations/Sec`
132+
133+
Check these links for the full list of performance counters on Reliable [Services](service-fabric-reliable-serviceremoting-diagnostics.md) and [Actors](service-fabric-reliable-actors-diagnostics.md)
134+
135+
## Next steps
136+
137+
* [Look Up Common Code Package Activation Errors](./service-fabric-diagnostics-code-package-errors.md)
138+
* [Set up Alerts in AI](/azure/azure-monitor/alerts/alerts-log) to be notified about changes in performance or usage
139+
* [Smart Detection in Application Insights](/azure/azure-monitor/alerts/proactive-diagnostics) performs a proactive analysis of the telemetry being sent to AI to warn you of potential performance problems
140+
* Learn more about Azure Monitor logs [alerting](/azure/azure-monitor/alerts/alerts-overview) to aid in detection and diagnostics.
141+
* For on-premises clusters, Azure Monitor logs offers a gateway (HTTP Forward Proxy) that can be used to send data to Azure Monitor logs. Read more about that in [Connecting computers without Internet access to Azure Monitor logs using the Log Analytics gateway](/azure/azure-monitor/agents/gateway)
142+
* Get familiarized with the [log search and querying](/azure/azure-monitor/logs/log-query-overview) features offered as part of Azure Monitor logs
143+
* For a detailed overview of Azure Monitor logs and what it offers, read [What is Azure Monitor logs?](/azure/azure-monitor/overview)

articles/service-fabric/service-fabric-diagnostics-event-analysis-appinsights.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)