Skip to content

Commit ae8eeab

Browse files
authored
small changes
1 parent 5933560 commit ae8eeab

File tree

1 file changed

+56
-27
lines changed

1 file changed

+56
-27
lines changed

articles/azure-web-pubsub/howto-troubleshoot-resource-logs.md

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: How to Troubleshoot with Azure Web PubSub Service Resource Logs
2+
title: Troubleshoot with Azure Web PubSub Service Resource Logs
33
description: Learn what resource logs are and how to use them to troubleshoot common problems.
44
author: wanlwanl
55
ms.author: wanl
@@ -16,9 +16,9 @@ This how-to guide provides an overview of Azure Web PubSub resource logs and tip
1616

1717
There are three types of resource logs:
1818

19-
- **Connectivity** logs provide detailed information for Azure Web PubSub hub connections. They might include basic information like user ID and connection ID, or event information like connect and disconnect.
20-
- **Messaging** logs provide tracing information for hub messages that are sent or received via the Azure Web PubSub service, like the tracing ID or message type.
21-
- **HTTP request** logs provide tracing information for HTTP requests to the Azure Web PubSub service, like HTTP method or status code. Typically, an HTTP request is recorded when it arrives at or leaves from the service.
19+
- *Connectivity* logs provide detailed information for Azure Web PubSub hub connections. They might include basic information like user ID and connection ID, or event information like connect and disconnect.
20+
- *Messaging* logs provide tracing information for hub messages that are sent or received via the Azure Web PubSub service, like the tracing ID or message type.
21+
- *HTTP request* logs provide tracing information for HTTP requests to the Azure Web PubSub service, like HTTP method or status code. Typically, an HTTP request is recorded when it arrives at or leaves from the service.
2222

2323
## Capture resource logs by using the live trace tool
2424

@@ -30,44 +30,59 @@ You should consider the following factors when using the live trace tool:
3030
- The Free tier instance of the Azure Web PubSub service has a daily limit of 20,000 messages (outbound traffic). You can unexpectedly reach the daily limit by using live trace.
3131
- The live trace tool doesn't currently support Microsoft Entra authorization. You must enable access keys to use live trace. Under **Settings**, select **Keys**, and then enable **Access Key**.
3232

33-
## Launch the live trace tool
33+
## Open the live trace tool
3434

3535
When you enable an access key, you use the access token to authenticate the live trace tool. Otherwise, you use Microsoft Entra ID to authenticate the live trace tool. You can find out if the access key is enabled by going to the **Keys** pane in your Azure SignalR Service instance in the Azure portal.
3636

37-
### Launch the live trace when the access key is enabled
37+
### Open the live trace when the access key is enabled
3838

3939
1. Go to the Azure portal and your SignalR Service pane.
40+
4041
1. On the service menu, under **Monitoring**, select **Live trace settings**.
42+
4143
1. Select **Enable Live Trace**.
44+
4245
1. Select the **Save** button. It takes a moment for the changes to take effect.
46+
4347
1. When updating is complete, select **Open Live Trace Tool**.
4448

4549
:::image type="content" source="./media/howto-troubleshoot-diagnostic-logs/diagnostic-logs-with-live-trace-tool.png" alt-text="Screenshot of opening the live trace tool.":::
4650

47-
### Launch the live trace tool when the access key is disabled
51+
### Open the live trace tool when the access key is disabled
4852

4953
#### Assign live trace tool API permission to yourself
5054

5155
1. Go to the Azure portal and your SignalR Service pane.
56+
5257
1. Select **Access control (IAM)**.
58+
5359
1. Select **+Add** and then select **Role assignment**.
60+
5461
1. On the **Job function roles** tab, select the **SignalR Service Owner** role, and then select **Next**.
62+
5563
1. On the **Members** pane, click **+Select members**.
64+
5665
1. Search and select members, and then click **Select**.
66+
5767
1. Select **Review + assign** and wait for the completion notification.
5868

5969
#### Enable the live trace tool
6070
1. Go to the Azure portal and your SignalR Service pane.
71+
6172
1. From the service menu, under **Monitoring**, select **Live trace settings**.
73+
6274
1. Select **Enable Live Trace**.
75+
6376
1. Select the **Save** button. It takes a moment for the changes to take effect.
77+
6478
1. When updating is complete, select **Open Live Trace Tool**.
6579

6680
:::image type="content" source="./media/howto-troubleshoot-diagnostic-logs/diagnostic-logs-with-live-trace-tool.png" alt-text="Screenshot of opening the live trace tool.":::
6781

6882
#### Sign in with your Microsoft account
6983

7084
1. The live trace tool causes a Microsoft sign-in window to open. If no window opens, allow pop-up windows in your browser settings.
85+
7186
1. Wait for **Ready** to appear on the status bar.
7287

7388
### Capture the resource logs
@@ -83,24 +98,24 @@ The live trace tool can help you capture the resource logs for troubleshooting.
8398

8499
The real-time resource logs captured by the live trace tool contain detailed information for troubleshooting.
85100

86-
| Name | Description |
87-
| -------------- | ----------------------------------------------------------------------------------------------- |
88-
| Time | Log event time |
89-
| Log Level | Log event level (`Trace`, `Debug`, `Informational`, `Warning` or `Error`) |
90-
| Event Name | Operation name of the event |
91-
| Message | Detailed message for the event |
92-
| Exception | Runtime exception of the Azure Web PubSub service |
93-
| Hub | User-defined hub name |
94-
| Connection ID | Identity of the connection |
95-
| User ID | User identity |
96-
| IP | Client IP address |
97-
| Route Template | Route template of the API |
98-
| HTTP Method | HTTP method (`POST`, `GET`, `PUT` or `DELETE`) |
99-
| URL | Uniform resource locator |
100-
| Trace ID | Unique identifier to the invocation |
101-
| Status Code | HTTP response code |
102-
| Duration | Duration between receiving the request and processing the request |
103-
| Headers | Additional information passed by the client and the server with an HTTP request or response |
101+
| Name | Description |
102+
| ------------------ | ----------------------------------------------------------------------------------------------- |
103+
| **Time** | Log event time |
104+
| **Log Level** | Log event level (`Trace`, `Debug`, `Informational`, `Warning` or `Error`) |
105+
| **Event Name** | Operation name of the event |
106+
| **Message** | Detailed message for the event |
107+
| **Exception** | Runtime exception of the Azure Web PubSub service |
108+
| **Hub** | User-defined hub name |
109+
| **Connection ID** | Identity of the connection |
110+
| **User ID** | User identity |
111+
| **IP** | Client IP address |
112+
| **Route Template** | Route template of the API |
113+
| **HTTP Method** | HTTP method (`POST`, `GET`, `PUT` or `DELETE`) |
114+
| **URL** | Uniform resource locator |
115+
| **Trace ID** | Unique identifier to the invocation |
116+
| **Status Code** | HTTP response code |
117+
| **Duration** | Duration between receiving the request and processing the request |
118+
| **Headers** | Additional information passed by the client and the server with an HTTP request or response |
104119

105120
## Capture resource logs with Azure Monitor
106121

@@ -109,15 +124,21 @@ The real-time resource logs captured by the live trace tool contain detailed inf
109124
Currently, Azure Web PubSub supports integration with [Azure Storage](/azure/azure-monitor/essentials/resource-logs#send-to-azure-storage).
110125

111126
1. Go to the Azure portal.
127+
112128
1. On the **Diagnostic settings** pane of your Azure Web PubSub service instance, select **+ Add diagnostic setting**.
129+
113130
:::image type="content" source="./media/howto-troubleshoot-diagnostic-logs/diagnostic-settings-list.png" alt-text="Screenshot of viewing diagnostic settings and creating a new one.":::
131+
114132
1. In **Diagnostic setting name**, enter the setting name.
133+
115134
1. In **Category details**, select any log category you need.
135+
116136
1. In **Destination details**, select **Archive to a storage account**.
117137

118138
:::image type="content" source="./media/howto-troubleshoot-diagnostic-logs/diagnostic-settings-details.png" alt-text="Screenshot of configuring the diagnostic setting.":::
119139

120140
1. Select **Save** to save the diagnostic setting.
141+
121142
> [!NOTE]
122143
> The storage account should be in the same region as the Azure Web PubSub service.
123144
@@ -184,7 +205,9 @@ The following code is an example of a JSON string in an archive log:
184205
To send logs to a Log Analytics workspace:
185206

186207
1. On the **Diagnostic setting** pane, under **Destination details**, select **Send to Log Analytics workspace**.
208+
187209
1. For **Subscription**, select the subscription that you want to use.
210+
188211
1. For the destination for the logs, select **Log Analytics workspace**.
189212

190213
To view the resource logs, follow these steps:
@@ -199,10 +222,14 @@ To view the resource logs, follow these steps:
199222

200223
To use a sample query for SignalR service, follow these steps:
201224

202-
1. Select **Logs** in your target Log Analytics.
225+
1. Select **Logs** in your target Log Analytics workspace.
226+
203227
1. Select **Queries** to open the query explorer.
228+
204229
1. Select **Resource type** to group sample queries by resource type.
230+
205231
1. Select **Run** to run the script.
232+
206233
:::image type="content" alt-text="Screenshot of a sample query in Log Analytics." source="./media/howto-troubleshoot-diagnostic-logs/log-analytics-sample-query.png" lightbox="./media/howto-troubleshoot-diagnostic-logs/log-analytics-sample-query.png":::
207234

208235
Archive log columns include elements listed in the following table.
@@ -249,4 +276,6 @@ If you get **401 Unauthorized** returned for client requests, check your resourc
249276

250277
### Throttling
251278

252-
If you find that you can't establish client connections to the Azure Web PubSub service, check your resource logs. If you see `Connection count reaches limit` in the resource log, you established too many connections to the Azure Web PubSub service and reached the connection count limit. Consider scaling up your Azure Web PubSub service instance. If you see `Message count reaches limit` in the resource log and you're using the Free tier, it means you used up the quota of messages. If you want to send more messages, consider changing your Azure Web PubSub service instance to Standard tier. For more information, see [Azure Web PubSub pricing](https://azure.microsoft.com/pricing/details/web-pubsub/).
279+
If you find that you can't establish client connections to the Azure Web PubSub service, check your resource logs. If you see `Connection count reaches limit` in the resource log, you established too many connections to the Azure Web PubSub service and reached the connection count limit. Consider scaling up your Azure Web PubSub service instance.
280+
281+
If you see `Message count reaches limit` in the resource log and you're using the Free tier, it means you used up the quota of messages. If you want to send more messages, consider changing your Azure Web PubSub service instance to Standard tier. For more information, see [Azure Web PubSub pricing](https://azure.microsoft.com/pricing/details/web-pubsub/).

0 commit comments

Comments
 (0)