【发布时间】:2020-12-16 04:24:26
【问题描述】:
我正在尝试将 @sentry/tracing 集成到 NodeJS + Express 应用程序中。
似乎没有我能找到的任何文档(我已向文档库here 提交了一个问题)。
我查看了@sentry/tracing 代码,似乎有一个 Express 集成可用。
基于集成源代码,它看起来应该像这样实例化:
const express = require('express');
const app = express();
const Sentry = require('@sentry/node');
const { Integrations } = require( "@sentry/tracing");
Sentry.init({
dsn: __MY_SENTRY_DSN__,
integrations: [
new Integrations.Express({app}),
]
});
我已经尝试过了,但我没有在 Sentry 中获得任何跟踪数据。
【问题讨论】: