Generally Available: Multi-line Logging Feature in Azure Monitor - Container Insights
公開日: 12月 18, 2023
Logs are an essential part of monitoring and troubleshooting applications running in containers. However, when logs are split across multiple lines due to container runtime, 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.
Next steps for Multi-Line Logging:
Read more about these updates in our blog post, which includes step by step instructions on how to enable.
Learn about the ContainerLogV2 schema here.