Nodejs APM Agent configured but nothing showing in APM/ElasticSearch

Nodejs APM Agent configured in AWS Lambda function, and appears to initialise correctly in the debug output (as far as I can tell) and sending to APM Server but nothing showing in Kibana/ElasticSearch
Kibana version:
7.0.0
Elasticsearch version:
7.0.0
APM Server version:
7.0.0.
APM Agent language and version:
"elastic-apm-node": "^2.10.0"
Browser version:
Chrome
Version 73.0.3683.103 (Official Build) (64-bit)
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
npm install elastic-apm-node

function starts with..
const apm = require('elastic-apm-node').start({
serviceName: 'tour',
secretToken: '**************',
serverUrl: 'https://**********.apm.ap-southeast-2.aws.cloud.es.io:443',
logLevel: 'trace'
});

Fresh install or upgraded from other version?
New installation
Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
We are using Elastic Cloud
Description of the problem including expected versus actual behaviour. Please include screenshots (if relevant):
The APM debug output looks fine with exceptions I can see the transaction and spans starting up and ending allegedly sending successfully but nothing is showing up in APM.
Steps to reproduce:

  1. Enable APM in Elastic Cloud
  2. npm install elastic-apm-node
  3. add custom transaction and spans and test

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):
2019-04-17T01:27:07.566Z 16973ec8-980f-464c-9bf5-bc8531378fad agent configured correctly { pid: 1,
ppid: 0,
arch: 'x64',
platform: 'linux',
node: 'v8.10.0',
agent: '2.10.0',
ancestors:
[ '/var/task/src/tour/node_modules/elastic-apm-node/index.js',
'/var/task/src/tour/list.js',
'/var/runtime/node_modules/awslambda/index.js',
[length]: 3 ],
startTrace:
[ 'at Agent.start (/var/task/src/tour/node_modules/elastic-apm-node/lib/agent.js:149:11)',
'at Object.<anonymous> (/var/task/src/tour/list.js:2:41)',
'at Module._compile (module.js:652:30)',
'at Object.Module._extensions..js (module.js:663:10)',
'at Module.load (module.js:565:32)',
'at tryModuleLoad (module.js:505:12)',
'at Function.Module._load (module.js:497:3)',
'at Module.require (module.js:596:17)',
'at require (internal/module.js:11:18)',
[length]: 9 ],
main: undefined,
dependencies: undefined,
conf:
{ verifyServerCert: true,
active: true,
logLevel: 'trace',
apiRequestSize: 786432,
apiRequestTime: 10,
stackTraceLimit: 50,
captureExceptions: true,
filterHttpHeaders: true,
captureErrorLogStackTraces: 'messages',
captureSpanStackTraces: true,
captureBody: 'off',
errorOnAbortedRequests: false,
abortedErrorThreshold: 25,
instrument: true,
asyncHooks: true,
sourceLinesErrorAppFrames: 5,
sourceLinesErrorLibraryFrames: 5,
sourceLinesSpanAppFrames: 0,
sourceLinesSpanLibraryFrames: 0,
errorMessageMaxLength: 2048,
transactionMaxSpans: 500,
transactionSampleRate: 1,
serverTimeout: 30,
disableInstrumentations: [ [length]: 0 ],
containerId: undefined,
kubernetesNodeName: undefined,
kubernetesNamespace: undefined,
kubernetesPodName: undefined,
kubernetesPodUID: undefined,
captureHeaders: true,
metricsInterval: 30,
usePathAsTransactionName: false,
addPatch: undefined,
serviceName: 'tour',
secretToken: '',
serverUrl: 'https://
***.apm.ap-southeast-2.aws.cloud.es.io:443',

Hi Martin,
as a first step, you could check if the APM Server is reachable from where the instrumented app is running, by sending curl -i <apm-server-url:apm-server-port>. If it is reachable, is there any information in the APM Server logs that gives a hint?

Hi Silvia,

Thanks for the response, as I am running node.js functions in AWS Lambda I can't run curl to check connectivity. However I am running other functions that are connecting to Elastic Cloud Bulk API from Lambda functions. There are also APM indicies being created but not populated with anything:

Looks like the log is truncated. Can you share a complete log file, including a call to the lambda function? There's not enough information for me to theorize what might be wrong.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.