node.js - 弹性 APM HTTP 错误 (404):找不到 404 页面
问题描述
在 Node Express 应用程序中集成 Elastic APM 时出错。
节点js:v6.4.2,
应用程序.js
require('elastic-apm-node').start({
serviceName: config.apm_node.SERVICE_NAME,
secretToken: config.apm_node.SECRET_TOKEN,
serverUrl: config.apm_node.SERVER_URL,
environment: config.apm_node.ENV,
});
包.json
"elastic-apm-node":"^1.14.4"
错误:
您触发了 unhandledRejection,您可能忘记捕获 Promise 拒绝:错误:发送后无法设置标头。在 ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11) 在 /home/ubuntu/depanels/server/api/user/user.controller.js:22:25 在 /home/ubuntu/depanels/server/auth/ auth.service.js:149:28 at _fulfilled (/home/ubuntu/depanels/node_modules/q/q.js:854:54) at self.promiseDispatch.done (/home/ubuntu/depanels/node_modules/q/q .js:883:30) 在 Promise.promise.promiseDispatch (/home/ubuntu/depanels/node_modules/q/q.js:816:13) 在 /home/ubuntu/depanels/node_modules/q/q.js:624 :44 在 runSingle (/home/ubuntu/depanels/node_modules/q/q.js:137:13) 在刷新 (/home/ubuntu/depanels/node_modules/q/q.js:125:
请建议我在哪里做错了?
解决方案
推荐阅读
- android - 我正在使用自定义视图在 android 中制作折叠工具栏。
- html - 对html结构的困惑
- javascript - js.cytoscape 从左到右生成图
- http - 使用 http 和 GStreamer 流式传输视频源
- machine-learning - 聚类 VS 监督分类,在非常小的数据库的情况下
- angular - 如何在角度 6 中单击复选框重新加载视图
- ruby-on-rails - 在rails中的一段时间后自动更新布尔属性
- postgresql - PG_Dump 返回“太多命令行参数(首先是“数据库名称”)
- react-native - React Native FlatList 一次渲染几个项目
- lua - 带小时、分钟和秒的数学运算