gpt4 book ai didi

用于存储微服务集中日志数据的 Azure PaaS

转载 作者:行者123 更新时间:2023-12-03 02:50:43 24 4
gpt4 key购买 nike

如果我们在azure AKS中部署微服务,可能会有多个pod和相同服务的副本。如果微服务想要保留有关其流程或错误的任何自定义日志信息,那么在哪里更好地集中存储此类日志?有PaaS服务吗? e. G。 Azure 存储?这里有什么真实的经验可以分享吗?

最佳答案

我建议Azure Application Insigths 。您可以使用this integration package通过aks详细信息丰富您的遥测数据。 :

... when using Microsoft Application Insights for Kubernetes, you will see Kubernetes related properties like Pod-Name, Deployment ... on all your telemetry entries. Proper values will also be set to make use of the rich features like enabling the Application Map to show the multiple micro services on the same map.

要在应用程序中进行日志记录,您可以使用 ILogger 接口(interface)(如果使用 .net)并通过管道 to app insights .

或者您可以使用 the sdk 编写自己的日志记录,提供选定语言版本。

对于 Java 应用程序,您可以通过管道传输日志 as well 。您可能必须使用 telemetry initializers 手动将 Pod 详细信息添加到遥测中。因为 Microsoft Application Insights for Kubernetes 包仅适用于 .Net。据我所知,他们使用 kubernetes Rest api 来查询详细信息。

关于用于存储微服务集中日志数据的 Azure PaaS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56263263/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com