Jump to content

Multi Line logging Azure Announcement (Preview Feature)


Recommended Posts

Guest ibraraslam
Posted

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

 

753x437vv2.png.67b2351563bf1918ec68934119448a9f.png

 

 

 

Multi-Line Enabled

 

1024x275vv2.thumb.png.e7aa4bd101dc56da216c23ca87316188.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.

 

835x96vv2.png.27b22b1fcc05d4dca420d753bdd63eab.png

 

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

 

919x85vv2.png.e7640c8aad80f41ad1b6eff2876fd003.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: Microsoft Forms

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...