GoLang - Lambda Randomly Sends Traces and Metrics to Elastic APM

andre_assis_appmax
Mon, 20 Jan 2025 21:27:55 +0000
Elastic Observability

Hello

I have a GoLang application that uses the Elastic APM Go Agent v2 and runs on AWS Lambda

The app runs as expected

When I test the integration between the app and Elastic APM using my local environment everything work as expected

However, when the application runs on AWS Lambda the communication occurs inconsistently. Sometimes it works and sometimes it doesn`t

The CloudWatch logs show two entries that may be related:

{"level":"error","time":"2025-01-20T21:06:01Z","message":"config request failed: sending config request failed: Get \"https://3463191296b94ba8a2aaf62c3f5ad343.apm.us-east-1.aws.cloud.es.io:443/config/v1/agents?service.environment=homologacao\u0026service.name=banking-router\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}

{"level":"error","time":"2025-01-20T21:02:42Z","message":"config request failed: sending config request failed: Get \"https://3463191296b94ba8a2aaf62c3f5ad343.apm.us-east-1.aws.cloud.es.io:443/config/v1/agents?service.environment=homologacao\u0026service.name=banking-router\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}

Has someone experienced something similar?

Thanks in advance!

1 post - 1 participant