Azure Kubernetes 中的应用程序日志记录

Application logging in Azure Kubernetes

在我们的场景中,我们正在尝试对使用 Nlog 在服务器上登录的基于 Asp.net 框架 4.6 的 Web API 进行 Docker 化。

目前该应用程序托管在 IIS 网络服务器上。

问题是在 Azure kubernetes 上重新托管应用程序时如何/在何处存储日志

我应该使用像 application insights 这样的东西吗

您可以使用包含 Application Insights 的 Azure Monitor 来获取您的应用程序日志。

这是 Azure Monitor for container

的官方 documentation

Azure Monitor for Containers supports consuming logs from not just Kubernetes but also from other orchestration engines such as DC/OS, Docker Swarm, and Red Hat OpenShift.

适用于容器的 Azure Monitor 非常适合基础设施监控和 Application Insights,它现在是 Monitor 的一部分,也非常适合 APM。

.NET 的应用程序洞察 https://docs.microsoft.com/en-us/azure/azure-monitor/app/asp-net