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
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.
3. Set enable_multiline_logs flag to “true” in the config map.
4. Apply the ConfigMap:
kubectl apply -f container-azm-ms-agentconfig.yaml
Note:
The configmap now features a language specification option, wherein the customers are required to include their preferred languages. This feature can be enabled by editing the languages in the [configmap]
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
Updated Mar 18, 2024
Version 4.0ibraraslam
Microsoft
Joined May 04, 2023
Azure Observability Blog
Follow this blog board to get notified when there's new activity