在Azure应用程序中添加日志记录的最佳实践,并确保不要丢失任何日志?

发布于 2025-01-26 01:23:42 字数 114 浏览 3 评论 0原文

我将应用程序切换到Azure。我添加了应用程序记录的应用程序洞察力。我还添加了更多其他记录,例如:Web服务器登录,详细的错误消息和失败的请求跟踪。我想确保每个细节记录得很好。我们还有其他伐木吗?最好的做法是什么?

I am switching my application to Azure. I have added application insight for application logging. Few more other loggings also I have added like: Web Server Logging, Detailed Error Messages and Failed Request Tracing. I want to make sure every detail is logged well. Do we have any other loggings? and What are the best practices?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你曾走过我的故事 2025-02-02 01:23:42

在使用使不登录所有内容的应用程序时要记住的一件事是,在某些情况下默认启用了采样,因此,如果您想确保绝对登录所有内容这是一个好主意,但这是一个不同的话题。

至于登录本身,互联网上有很多好的教程可以阅读,如果您真的想要所有内容,您可能需要启用诊断记录,但为很多Noice做准备。

我认为最好考虑一下您真正使用的日志,并确保将这些日志注入应用程序洞察并从那里转移到那里

One thing to remember when using applications that makes it easy to not log everything is that sampling is enabled by default in some instances, so if you want to make sure to log absolutely everything then sampling needs to be turned off, now I am not saying this is a good idea but that is a different topic.

As for the logging itself there are plenty of good tutorials on the Internet to read, and if you really want all you might need to enable diagnostic logging as well but prepare for a lot of noice.

I think it is better to really think about what logs you really ened and make sure those get injected into app insights and go from there

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文