NodeProfiling
捕获 Node.js 应用程序的性能分析数据。
此集成仅在 Node.js 运行时中工作。
nodeProfilingIntegration
必须从 @sentry/profiling-node
包导入。
性能分析 在传统追踪的基础上提供了更深层次的可见性,消除了对自定义插装的需求,并在生产环境中提供精确的代码级可见性。
NodeProfiling 集成为您的 Node.js 应用程序设置自动性能分析。它通过 v8 捕获分析数据并将其发送到 Sentry。要使用此集成,您还需要启用性能监控。
了解更多关于 设置 NodeProfiling 的信息。
Copied
const Sentry = require("@sentry/node");
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
integrations: [nodeProfilingIntegration()],
});