Log storage and monitoring options in Azure Container Apps (2024)

  • Article

Azure Container Apps gives you options for storing and viewing your application logs. Logging options are configured in your Container Apps environment where you select the log destination.

Container Apps application logs consist of two different categories:

  • Container console output (stdout/stderr) messages.
  • System logs generated by Azure Container Apps.
  • Spring App console logs.

You can choose between these logs destinations:

  • Log Analytics: Azure Monitor Log Analytics is the default storage and viewing option. Your logs are stored in a Log Analytics workspace where they can be viewed and analyzed using Log Analytics queries. To learn more about Log Analytics, see Azure Monitor Log Analytics.
  • Azure Monitor: Azure Monitor routes logs to one or more destinations:
    • Log Analytics workspace for viewing and analysis.
    • Azure storage account to archive.
    • Azure event hub for data ingestion and analytic services. For more information, see Azure Event Hubs.
    • An Azure partner monitoring solution such as, Datadog, Elastic, Logz.io and others. For more information, see Partner solutions.
  • None: You can disable the storage of log data. When disabled, you can still view real-time container logs via the Logs stream feature in your container app. For more information, see Log streaming.

When None or the Azure Monitor destination is selected, the Logs menu item providing the Log Analytics query editor in the Azure portal is disabled.

Configure options via the Azure portal

Use these steps to configure the logging options for your Container Apps environment in the Azure portal:

  1. Go to the Logging Options on your Container Apps environment window in the portal.Log storage and monitoring options in Azure Container Apps (1)
  2. You can choose from the following Logs Destination options:
    • Log Analytics: With this option, you select a Log Analytics workspace to store your log data. Your logs can be viewed through Log Analytics queries. To learn more about Log Analytics, see Azure Monitor Log Analytics.
    • Azure Monitor: Azure Monitor routes your logs to a destination. When you select this option, you must select Diagnostic settings to complete the configuration after you select Save on this page.
    • None: This option disables the storage of log data.
  3. Select Save.Log storage and monitoring options in Azure Container Apps (2)
  4. If you have selected Azure Monitor as your logs destination, you must configure Diagnostic settings. The Diagnostic settings item appears below the Logging options menu item.

Diagnostic settings

When you select Azure Monitor as your logs destination, you must configure the destination details. Select Diagnostic settings from the left side menu of the Container Apps Environment window in the portal.

Log storage and monitoring options in Azure Container Apps (3)

Destination details are saved as diagnostic settings. You can create up to five diagnostic settings for your container app environment. You can configure different log categories for each diagnostic setting. For example, create one diagnostic setting to send the system logs category to one destination, and another to send the container console logs category to another destination.

To create a new diagnostic setting:

  1. Select Add diagnostic setting.Log storage and monitoring options in Azure Container Apps (4)

  2. Enter a name for your diagnostic setting.Log storage and monitoring options in Azure Container Apps (5)

  3. Select the log Category groups or Categories you want to send to this destination. You can select one or more categories.

  4. Select one or more Destination details:

    • Send to Log Analytics workspace: Select from existing Log Analytics workspaces.Log storage and monitoring options in Azure Container Apps (6)
    • Archive to a storage account: You can choose from existing storage accounts. When the individual log categories are selected, you can set the Retention (days) for each category.Log storage and monitoring options in Azure Container Apps (7)
    • Stream to an event hub: Select from Azure event hubs.
      Log storage and monitoring options in Azure Container Apps (8)
    • Send to a partner solution: Select from Azure partner solutions.
  5. Select Save.

For more information about Diagnostic settings, see Diagnostic settings in Azure Monitor.

Configure options using the Azure CLI

Configure logs destination for your Container Apps environment using the Azure CLI az containerapp create and az containerapp update commands with the --logs-destination argument.

The destination values are: log-analytics, azure-monitor, and none.

For example, to create a Container Apps environment using an existing Log Analytics workspace as the logs destination, you must provide the --logs-destination argument with the value log-analytics and the --logs-destination-id argument with the value of the Log Analytics workspace resource ID. You can get the resource ID from the Log Analytics workspace page in the Azure portal or from the az monitor log-analytics workspace show command.

Replace <PLACEHOLDERS> with your values:

az containerapp env create \ --name <ENVIRONMENT_NAME> \ --resource-group <RESOURCE_GROUP> \ --logs-destination log-analytics \ --logs-workspace-id <WORKSPACE_ID>

To update an existing Container Apps environment to use Azure Monitor as the logs destination:

Replace <PLACEHOLDERS> with your values:

az containerapp env update \ --name <ENVIRONMENT_NAME> \ --resource-group <RESOURCE_GROUP> \ --logs-destination azure-monitor

When --logs-destination is set to azure-monitor, create diagnostic settings to configure the destination details for the log categories with the az monitor diagnostics-settings command.

To send app-level metrics to Log Analytics:

Replace <PLACEHOLDERS> with your values:

az monitor diagnostic-settings create \--name "AllMetricsToLogAnalytics" \--resource <APP_ARM_RESOURCE_ID> \--metrics '[{"category": "AllMetrics","enabled": true}]' \--workspace <LOG_ANALYTICS_ARM_RESOURCE_ID>

For more information about Azure Monitor diagnostic settings commands, see az monitor diagnostic-settings. Container Apps log categories are ContainerAppConsoleLogs and ContainerAppSystemLogs.

Next steps

Monitor logs with Log Analytics

Log storage and monitoring options in Azure Container Apps (2024)
Top Articles
Forex - Boot met Vracht / Containers - 90x60cm Foto op Forex | bol
30 Frugal Extreme Money Saving Tips For 2023 | Frugal For Less
Craigslist Home Health Care Jobs
Fat Hog Prices Today
Wordscapes Level 5130 Answers
Algebra Calculator Mathway
OSRS Fishing Training Guide: Quick Methods To Reach Level 99 - Rune Fanatics
Dr Doe's Chemistry Quiz Answer Key
Klustron 9
Miles City Montana Craigslist
Lenscrafters Westchester Mall
Wal-Mart 140 Supercenter Products
Wmlink/Sspr
Craigslist Free Grand Rapids
Driving Directions To Atlanta
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
Bestellung Ahrefs
Nissan Rogue Tire Size
WEB.DE Apps zum mailen auf dem SmartPhone, für Ihren Browser und Computer.
Strange World Showtimes Near Roxy Stadium 14
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Nhl Tankathon Mock Draft
Kamzz Llc
Georgia Cash 3 Midday-Lottery Results & Winning Numbers
Evil Dead Rise Showtimes Near Regal Sawgrass & Imax
Manuela Qm Only
Delta Township Bsa
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
Deepwoken: Best Attunement Tier List - Item Level Gaming
Devargasfuneral
Rund um die SIM-Karte | ALDI TALK
Upstate Ny Craigslist Pets
Hermann Memorial Urgent Care Near Me
7543460065
Gpa Calculator Georgia Tech
Mars Petcare 2037 American Italian Way Columbia Sc
Miracle Shoes Ff6
Gary Lezak Annual Salary
Top 25 E-Commerce Companies Using FedEx
Omaha Steaks Lava Cake Microwave Instructions
R/Moissanite
Puretalkusa.com/Amac
Kutty Movie Net
Dragon Ball Super Super Hero 123Movies
Blackwolf Run Pro Shop
Pink Runtz Strain, The Ultimate Guide
Yale College Confidential 2027
Centimeters to Feet conversion: cm to ft calculator
Wvu Workday
2000 Fortnite Symbols
Public Broadcasting Service Clg Wiki
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 5893

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.