我正在尝试为 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 框架。

我有同样的问题。解决方案是将 amp config 放在依赖项导入之前。
前任:
const apm = require('elastic-apm-node').start({
...
})
const express = require('express');
const { Sequelize, Model, DataTypes } = require('sequelize');
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(5条)