Running a .NET application in diverse environments can make collecting diagnostics artifacts (e.g., logs, traces, process dumps) challenging. dotnet monitor is a tool that provides an unified way to collect these diagnostic artifacts regardless of whether running you’re running on your desktop machine or in a kubernetes cluster.
There are two different mechanisms for collection of these diagnostic artifacts:
An HTTP API for on demand collection of artifacts. You can call these API endpoints when you already know your application is experiencing an issue and you are interested in gathering more information.
Triggers for rule-based configuration for always-on collection of artifacts. You may configure rules to collect diagnostic artifacts when a desired condition is met, for example, collect a process dump when you have sustained high CPU.
复制代码
google翻译:
在不同的环境中运行 .NET 应用程序会使收集诊断工件(例如,日志、跟踪、进程转储)具有挑战性。dotnet monitor是一个工具,它提供了一种统一的方式来收集这些诊断工件,无论您是在台式机上运行还是在 kubernetes 集群中运行。
收集这些诊断工件有两种不同的机制:
用于按需收集工件的HTTP API 。当您已经知道您的应用程序遇到问题并且您有兴趣收集更多信息时,您可以调用这些 API 端点。
基于规则的配置触发器,用于始终在线收集工件。您可以配置规则以在满足所需条件时收集诊断工件,例如,当您持续使用高 CPU 时收集进程转储。
dotnet-monitor工作在什么位置?