You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/container-apps/sessions-usage.md
+1-50Lines changed: 1 addition & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,56 +351,7 @@ This template contains the following settings for managed identity:
351
351
352
352
## Logging
353
353
354
-
Session pools can send session logs to a Log Analytics workspace by using Azure Monitor diagnostic settings on the Container Apps environment. Some log tables are available only for custom container session pools.
355
-
356
-
> [!NOTE]
357
-
> Session log tables are available after diagnostic settings are configured to send logs to Log Analytics.
358
-
359
-
### Configure logging
360
-
361
-
Session pools route logs through a Container Apps environment. The environment is the Azure resource that connects your session pool to a Log Analytics workspace. You specify the environment when you create a custom container session pool, or it's automatically associated with code interpreter session pools.
362
-
363
-
1. In the [Azure portal](https://portal.azure.com), search for and select **Container Apps Environments**, then select the environment associated with your session pool.
364
-
1. Under **Monitoring**, select **Diagnostic settings**, then select **+ Add diagnostic setting**.
365
-
1. Select the session-related log categories you want to capture and set the destination to **Send to Log Analytics workspace**.
366
-
1. Choose your workspace and select **Save**.
367
-
368
-
### Log tables
369
-
370
-
Use these tables to query session logs:
371
-
372
-
| Table name | Description | Applies to |
373
-
| --- | --- | --- |
374
-
|`AppEnvSessionLifecycleLogs`| System logs for session allocation and lifecycle events. | All session pools |
375
-
|`AppEnvSessionPoolEvents`| Events related to session pool management, pod creation, and deletion. | All session pools |
376
-
|`AppEnvSessionConsoleLogs`| Console output and logs from session containers. | Custom container session pools only |
377
-
378
-
### Sample queries
379
-
380
-
**View recent console logs from sessions**
381
-
382
-
```kusto
383
-
AppEnvSessionConsoleLogs
384
-
| where TimeGenerated > ago(1h)
385
-
| order by TimeGenerated desc
386
-
| take 100
387
-
```
388
-
389
-
**View session lifecycle events**
390
-
391
-
```kusto
392
-
AppEnvSessionLifecycleLogs
393
-
| where TimeGenerated > ago(1h)
394
-
| order by TimeGenerated desc
395
-
```
396
-
397
-
**View session pool events**
398
-
399
-
```kusto
400
-
AppEnvSessionPoolEvents
401
-
| where TimeGenerated > ago(1h)
402
-
| order by TimeGenerated desc
403
-
```
354
+
Console logs from containers running in a session are available in the Azure Log Analytics workspace associated with the Azure Container Apps environment in a table named `AppEnvSessionConsoleLogs_CL`.
0 commit comments