DataDog / serverless-plugin-datadog

Serverless plugin to automagically instrument your Lambda functions with Datadog
Apache License 2.0
96 stars 49 forks source link

AWS_LAMBDA_EXEC_WRAPPER should not be set for python runtimes #461

Closed pchrapka closed 9 months ago

pchrapka commented 9 months ago

Expected Behavior

Setting enableASM flag to true should create a functional lambda.

Actual Behavior

Lambda throws a runtime error with /opt/data_wrapper does not exist

Steps to Reproduce the Problem

  1. set enableASM=true
  2. deploy
  3. test lambda function

Specifications

Stacktrace

  Paste here
Paullh95 commented 9 months ago

Expected Behavior

Logs will be forwarded to the datadog extension Datadog Serverless Plugin version: 5.56.0 with identical setup does not throw the error

Actual Behavior

Lambda throws a error:

{
  "errorType": "Extension.LaunchError",
  "errorMessage": "RequestId: 42aaa24b-4744-4f7c-8a5d-f9c7d9c1ace3 Error: fork/exec /opt/extensions/datadog-agent: exec format error"
}

Steps to Reproduce the Problem

  1. Add Datadog extension to serverless.yml (https://docs.datadoghq.com/serverless/aws_lambda/installation/go/?tab=serverlessframework)
  2. deploy
  3. test lambda function

    Specifications

    • Serverless Framework version: ^3.25.1
    • Datadog Serverless Plugin version: ^5.57.0
    • Lambda function runtime (arm64): provided al.2
    • Lambda function code: bootstrap binary from Go compiled with go1.21

Current findings

Is it possible that this Layer, which is described in src/layers.json line103-104 (Layer Version 54) is having issues?

I looked up the Datadog-Lambda-extension Repo and saw they only released version until 53. Im not quite sure if this v53 is related to the referenced Number (in the layers.json file) but I'm guessing it, because previos version works fine.

BR Paul

Update 09.02.2024: With 5.57.1 it works again: https://github.com/DataDog/serverless-plugin-datadog/tree/v5.57.1

duncanista commented 9 months ago

cc @DylanLovesCoffee for visibility

DylanLovesCoffee commented 9 months ago

👋 hey, sorry about this. As @Paullh95 mentioned, this is indeed an issue with a partial release of v54 of the Lambda Extension which has been reverted with v5.57.1.