1

我启动了弹性 apm 代理并尝试将自定义日志推送到弹性中,但这些日志在弹性中不可用。你们能否让我知道如何实现自定义日志。下面我附上了我的代码片段。

const apm = elasticApm.start({
        "serviceName": "",
        "secretToken": "xxxx",
        "serverUrl": "xxxx",
        "environment": "xxx"
      });
apm.setCustomContext({"apm": "test"}); // This is custom context is missing in elastic side. 
apm.captureError(new Error('dummy error')); // I can able to see this error in elastic.
4

0 回答 0