Kibana version: v6.6.0
Elasticsearch version:v6.6.0
APM Server version:v6.6.0
APM Agent language and version: "elastic-apm-node": "2.5.1"
So I have followed the steps described on the APM site to set APM plugin in my AWS lambda function: https://www.elastic.co/guide/en/apm/agent/nodejs/1.x/lambda.html
Then I've copied the config from APM configuration site on Kibana (APM -> Setup instructions) but it doesn't work.
Here is the code:
import apm from 'elastic-apm-node/start'
const agent = apm.start({
serviceName: 'test-api',
secretToken: 'secret_value',
serverUrl: 'https://hash.apm.eu-west-1.aws.cloud.es.io:443',
logLevel: 'debug'
});
Then wrapped my function like that:
export const testFunction = agent.lambda(async (event: APIGatewayEvent) => {});
When I run the lambda and hit the endpoint related to this function I can see log in Cloudwatch that says:
"APM Server transport error (ECONNREFUSED): connect ECONNREFUSED 127.0.0.1:8200
" So it looks like it's trying to connect to localhost instead of connecting with remote server?
I've tried the .NET Core APM as well and it's not throwing any error but it's not sending anything as well so what am I doing wrong?