var apm = require('elastic-apm-node').start({
serviceName: 'my-apm',
secretToken: '',
// Set custom APM Server URL (default: http://127.0.0.1:8200)
serverUrl: 'https://my-apm-http:8200',
// Only activate the agent if it's running in production
active: process.env.NODE_ENV === 'production',
verifyServerCert: false,
serverCaCertFile: '/etc/ca-certificates/apm.crt',
Errors:
[myapp-0 myapp] {"log.level":"trace","@timestamp":"2023-08-23T06:13:21.947Z","log":{"logger":"elastic-apm-node"},"event.module":"apmclient","reqId":"83fb5052fa3f5a4420824fabac133671","timeline":[[10002.293778,"completePart gzipStream",null],[10002.594401,"completePart intakeReq",null],[10003.133811,"completePart intakeRes","Unexpected APM Server response"]],"bytesWritten":731,"backoffDelayMs":15952.873427495506,"ecs":{"version":"1.6.0"},"error":{"type":"Error","message":"Unexpected APM Server response","stack_trace":"Error: Unexpected APM Server response\n at processIntakeErrorResponse (/node_modules/elastic-apm-http-client/index.js:1515:15)\n at IncomingMessage.<anonymous> (/node_modules/elastic-apm-http-client/index.js:1049:17)\n at IncomingMessage.emit (node:events:526:35)\n at endReadableNT (node:internal/streams/readable:1376:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"},"message":"conclude intake request: error"}
[myapp-0 myapp] {"log.level":"error","@timestamp":"2023-08-23T06:13:21.947Z","log":{"logger":"elastic-apm-node"},"ecs":{"version":"1.6.0"},"message":"APM Server transport error (401): Unexpected APM Server response\n{\n \"error\": \"authentication failed: missing or improperly formatted Authorization header: expected 'Authorization: Bearer secret_token' or 'Authorization: ApiKey base64(API key ID:API key)'\"\n}\n"}
Kibana version: 8.9.1
Elasticsearch version:8.9.1
APM Server version: 8.9.1
APM Agent language and version: Node.JS
Browser version:
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Fresh install or upgraded from other version? Fresh
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.
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Steps to reproduce:
1.
2.
3.
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):