Announcing GA: Multi-Line Logging in Azure Monitor - Container Insights
Published Nov 15 2023 03:25 PM 4,352 Views

Today, at Ignite, we are thrilled to announce the General Availability of Multi-Line Logging in Azure Monitor – Container Insights. Multi-Line Logging is a new way to simplify and streamline your Log Analysis in Azure Monitor. This feature allows you to collect and store multiple lines of log data in a single log entry, making it easier to view and analyze logs from your containerized applications. 


Why Multi-Line Logging? 

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. For example, stack traces from .NET and Go applications can span multiple log entries, making it hard to identify the root cause of errors. 


Multi-Line logging is a new feature in Azure Monitor - Container Insights that allows you to collect and store multiple lines of log data in a single log entry, making it easier to view and analyze logs. With this feature enabled, previously split container logs are stitched together and sent as single entries to the ContainerLogV2 table. This will also help customers save on cost as it is reducing the metadata added on multiple lines. 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 also helps capture stack traces for .NET, Go, Python, and Java as a single log record. We will continue to add support for additional languages and formats. 


Multi-Line Disabled 



Multi-Line Enabled 



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. 


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


  1. Apply the ConfigMap: 

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

Note: If you have an existing configmap deployed, update it rather than overwriting it. 


Next steps for Multi-Line logging: 

Read more about the ContainerLogV2 schema here


Please share any feedback for this feature using this form:

1 Comment
Version history
Last update:
‎Nov 15 2023 03:32 PM
Updated by: