elastic / apm-aws-lambda

A repository for the AWS Lambda extension and other lambda related tools and build scripts.
https://www.elastic.co/guide/en/apm/guide/current/monitoring-aws-lambda.html
Apache License 2.0
16 stars 27 forks source link

Avoid race conditions when handling data #570

Closed florianl closed 2 weeks ago

florianl commented 3 weeks ago

Initialize local variable only once and make sure expected APMData is handled first.

lahsivjar commented 2 weeks ago

Do we need anything else to get this merged?

I think with sync.Once to nil check we should be good to merge. The remaining point on the ErrNoData is not that important and we can ignore it if it doesn't make sense to others.