没有“ perfomense”在Nestjs的哨兵项目中

发布于 2025-01-26 14:10:00 字数 735 浏览 3 评论 0原文

哨兵中的“性能”选项卡中没有数据。该项目用Nestjs编写。 我这样连接哨兵

 const app = await NestFactory.create(AppModule);
  app.enableCors({
    allowedHeaders: '*',
    origin: '*',
    methods: 'GET,PUT,POST,DELETE,OPTIONS',
    preflightContinue: true,
  });
  const config = app.get<ConfigService>(ConfigService);
  const dsnSentry = config.get('SENTRY_DSN');
      Sentry.init({
        dsn: dsnSentry,
        environment: config.get('ENV'),
        integrations: [
          new Sentry.Integrations.Http({ tracing: true }),
        ],
        tracesSampleRate: 1,
      });

...

  app.use(Sentry.Handlers.requestHandler());
  app.use(Sentry.Handlers.tracingHandler());

如何在哨兵中获得性能?现在是空的

No data on the Performance tab in Sentry. The project is written in NestJS.
I connect Sentry like this

 const app = await NestFactory.create(AppModule);
  app.enableCors({
    allowedHeaders: '*',
    origin: '*',
    methods: 'GET,PUT,POST,DELETE,OPTIONS',
    preflightContinue: true,
  });
  const config = app.get<ConfigService>(ConfigService);
  const dsnSentry = config.get('SENTRY_DSN');
      Sentry.init({
        dsn: dsnSentry,
        environment: config.get('ENV'),
        integrations: [
          new Sentry.Integrations.Http({ tracing: true }),
        ],
        tracesSampleRate: 1,
      });

...

  app.use(Sentry.Handlers.requestHandler());
  app.use(Sentry.Handlers.tracingHandler());

How do I get Performance in Sentry? Right now it's empty

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

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

发布评论

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

评论(1

眼眸印温柔 2025-02-02 14:10:00

https://github.com/getsentry/sentry-sentry-sentry-javascript/4731/4731/4731/4731/4731
如果缺少这种进口,有些人有问题:

import "@sentry/tracing";

As described in https://github.com/getsentry/sentry-javascript/issues/4731
some people had problems if this import was missing:

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