Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda functions break when instrumenting with Datadog Layers when using NODEJS_LATEST runtime #314

Open
maherio opened this issue Oct 16, 2024 · 1 comment

Comments

@maherio
Copy link

maherio commented Oct 16, 2024

Expected Behavior

I can create a Lambda function using Runtime.NODEJS_LATEST and instrument it with Datadog layers.
Or at the very least, my function is not instrumented at all and can still successfully execute.

Actual Behavior

  • Datadog silently skips applying the layers (debug logs include Unsupported runtime: ${Token[TOKEN.1308]}).
  • However it also continues trying to instrument the lambda, which results in the lambda executions failing since it is expecting the layer to be there (/opt/datadog_wrapper: does not exist).

Steps to Reproduce the Problem

const lambdaFunction = new Function(this, 'MyLambdaFunction', {
  runtime: Runtime.NODEJS_LATEST,
  ...
});

const datadog = new Datadog(this, "Datadog", {
  nodeLayerVersion: 115,
  extensionLayerVersion: 63,
  ...
});
datadog.addLambdaFunctions([lambdaFunction])

Specifications

  • Node version: NODEJS_LATEST
@lym953
Copy link
Contributor

lym953 commented Oct 16, 2024

@maherio Thanks for reporting. Could you share more of this code

const lambdaFunction = new Function(this, 'MyLambdaFunction', {
  runtime: Runtime.NODEJS_LATEST,
  ...
});

For example, what other params are you passing? Are you setting a bundling image?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants