nodejs应用程序的弹性 apm中没有数据

我正在尝试为 nodejs 应用程序设置 elastic apm。我遵循了 elk 集成页面中解释的示例。

我正在尝试为 nodejs 应用程序设置 elastic apm。我遵循了 elk 集成页面中解释的示例。

var apm = require('elastic-apm-node').start({
// Override the service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
    serviceName: 'pv-server',
// Use if APM Server requires a secret token
    secretToken: '',
    logLevel:"debug",
// Set the custom APM Server URL (default: http://localhost:8200)
    serverUrl: 'http://localhost:8200',
    captureBody: 'all',
    active: true,
    usePathAsTransactionName: true,
// Set the service environment
    environment: 'dev'
})

当启动弹性 apm 仅显示 CPU 使用数据时,事务 / 跟踪中没有数据。我正在使用expressWeb 框架。

enter image description here

enter image description here

1

我有同样的问题。解决方案是将 amp config 放在依赖项导入之前。

前任:

const apm = require('elastic-apm-node').start({
    ...
})
const express = require('express');
const { Sequelize, Model, DataTypes } = require('sequelize');

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(85)
使用 JavaScript比较两个日期
上一篇
在package.json类型字段中放入基于 typescript的库
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(58条)