Dd-trace-js: AWS lambda plugin custom context breaking with aws-lambda-java

Created on 15 Apr 2021  路  5Comments  路  Source: DataDog/dd-trace-js

Bug

Hello Datadog,
As reported in this issue https://github.com/aws/aws-lambda-java-libs/issues/212, the aws-lambda-java-core library expects the custom client context to be a map of key values and doesn't accept an object as the value.

Upgrading to dd-trace 0.31.0 with #1166 is breaking Lambda invocations when aws-lambda-java-core is used (cc @Czechh @rochdev)

Is there a way to disable the lambda plugin via init config?

Environment

  • Operation system:
  • Node version:
  • Tracer version:
    0.31.0
  • Agent version:
bug community integrations

Most helpful comment

In case it helps others, we have disabled the aws sdk plugin for now by setting 'aws-sdk' as the value of the DD_TRACE_DISABLED_PLUGINS env variable.

All 5 comments

Unfortunately the Lambda integration cannot be disabled right now without disabling the entire AWS SDK plugin.

I'm currently trying to figure out internally if we could switch to a string to avoid hitting the bug.

can confirm that a similar marshalling error also occurs in aws-lambda-go due to this issue.

We're working internally to fix this but since we have multiple libraries to keep in sync it will take a bit of time. I would recommend to also open issues in each AWS library affected by this as well since from our understanding it's a bug on their side. We'll still provide a fix on our end for backward compatibility.

In case it helps others, we have disabled the aws sdk plugin for now by setting 'aws-sdk' as the value of the DD_TRACE_DISABLED_PLUGINS env variable.

Hey @josephsofaer , I'm having difficulty replicating this bug. I'm using dd-trace-js to instrument a JS lambda function that uses aws-sdk/client-lambda to invoke a Java lambda function using InvocationType: "RequestResponse". I have a fix in mind, but I'd like to verify that it works. Is there any way you could share a snippet of how you're invoking a Java lambda function that would illustrate this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lancedikson picture lancedikson  路  6Comments

zen0wu picture zen0wu  路  5Comments

Cretezy picture Cretezy  路  5Comments

wcoc picture wcoc  路  3Comments

kumaraksi picture kumaraksi  路  5Comments