You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Node环境下Fastify集成Sentry性能追踪功能失效问题求助

Fastify 下 Sentry 性能追踪过渡配置

目前Fastify的Sentry性能追踪官方集成仍处于开发中(WIP),以下是依据Sentry官方文档完成的基础配置代码,可作为临时过渡方案使用:

const sentryIntegrations = [
  new Sentry.Integrations.Http({ tracing: true }),
  ...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
];

Sentry.init({
  dsn: '...',
  enabled: true,
  integrations: sentryIntegrations,
});

注意事项:

  • 当前配置仅能捕获HTTP请求等通用Node.js层面的性能数据,无法完整覆盖Fastify特有的路由处理、钩子执行等环节的追踪
  • 后续可留意Sentry官方发布,待Fastify集成正式上线后替换为专用集成以获得更全面的性能监控能力

内容的提问来源于stack exchange,提问作者CommonSenseCode

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 16:23:10