Multi Line logging Azure Announcement (Preview Feature)

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

We’re excited to let you know that Azure Monitor – Container Insights now supports multiline logging! With this feature enabled, previously split container logs are stitched together and sent as single entries to the ContainerLogV2 table. Customers are able see container log lines up to 64 KB (up from the existing 16 KB limit). If the stitched log line is larger than 64 KB, it gets truncated due to Log Analytics limits. This feature enables the customers to directly consume the logs in meaningful ways without having to spend time stitching them with custom Kusto queries. Additionally, the feature also adds support for .NET and Go stack traces, which appear as single entries instead of being split into multiple entries in ContainerLogV2 table.

 

Why this is important:

Logs are an essential part of monitoring and troubleshooting applications running in containers. However, when logs are split across multiple lines, it can be challenging to consume them effectively. View the example of Multi-Line below:

 

Multi-Line Disabled

ibraraslam_0-1683672002234.png

 

Multi-Line Enabled

ibraraslam_1-1683672002239.png

 

 

To enable multi-line logging:

1. Make sure agent is updated to version 3.1.6 or later

2. Customers must enable ContainerLogV2 for multi-line logging to work. Go to the ConfigMap to enable ContainerLogV2 in Container Insights.

ibraraslam_2-1683672002240.png

3. Set enable_multiline_logs flag to “true” in the config map.

ibraraslam_3-1683672002241.png

4. Apply the ConfigMap:

kubectl apply -f container-azm-ms-agentconfig.yaml

 

Next steps for multi-line logging:

Read more about the ContainerLogV2 schema here.

 

Please share any feedback for this feature using this form: https://forms.office.com/r/FCDvikMZ0S

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.