Microsoft has introduced a new policy for Azure Container Apps, enabling developers to send logs to multiple destinations, including Log Analytics Workspace and storage accounts. This guide outlines two methods for implementing logging, provides solutions for various scenarios, and emphasizes the importance of using the right policies to avoid configuration loss.2.

“`html
New Logging Policies for Azure Container Apps
Azure developers, rejoice! Microsoft has introduced a new policy for sending logs to multiple destinations for container apps. This feature enhances logging capabilities, allowing for better monitoring and diagnostics. In this post, we’ll explore what’s new, key updates, and essential information you need to know.
What’s New in Logging Options
The latest update provides two options for logging:
- Sending Logs to Log Analytics Workspace
- Sending Logs to Multiple Destinations (Log Analytics Workspace and Storage Account)
These options enable developers to tailor logging to their specific needs, enhancing the overall monitoring experience.
Major Updates to Consider
To implement these logging policies, developers can choose between two methods:
- Utilizing the “logging options” under the monitoring section to send logs solely to the Log Analytics Workspace.
- Leveraging “Azure Monitor” to add diagnostic settings and send logs to multiple destinations.
As noted in the blog,
“We want to send logs to multiple destinations because we want to enhance our monitoring capabilities.”This flexibility is crucial for effective resource management.
Important Considerations
When deploying these logging policies, developers should be aware of some limitations. For instance, the property appLogsConfiguration.destination
is not modifiable. Any omitted properties during PUT calls can lead to the loss of essential information.
Moreover, the DINE effect may revert some properties to default values upon resource remediation. As a workaround, developers can use linked templates to maintain existing workload profile settings while updating the environment resource. This ensures a seamless integration of logging without compromising existing configurations.
In scenarios where Terraform is used, the Deny effect can prevent non-compliant resources from being deployed. This approach ensures that only compliant configurations are accepted, enhancing overall governance.
Conclusion
With the introduction of these logging policies, Azure Container Apps are set to offer improved monitoring capabilities. Developers can now customize their logging strategies, ensuring better resource management and diagnostics. Stay tuned for more updates and best practices to maximize your Azure experience!
“`From the Microsoft Developer Community Blog