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

Issue with aws-sdk v3 #97

Closed
brucedeen opened this issue May 27, 2021 · 3 comments
Closed

Issue with aws-sdk v3 #97

brucedeen opened this issue May 27, 2021 · 3 comments
Labels

Comments

@brucedeen
Copy link

I have a NodeJS Runtime 12 lambda.

Issue I'm facing

When I run the lambda the following occurs

{
  "errorType": "TypeError",
  "errorMessage": "Cannot redefine property: constructStack",
  "trace": [
    "TypeError: Cannot redefine property: constructStack",
    "    at Function.defineProperty (<anonymous>)",
    "    at defineProperty (/opt/nodejs/node_modules/shimmer/index.js:14:10)",
    "    at AwsInstrumentation.wrap [as _wrap] (/opt/nodejs/node_modules/shimmer/index.js:56:3)",
    "    at AwsInstrumentation.patchV3ConstructStack (/opt/nodejs/node_modules/opentelemetry-instrumentation-aws-sdk/dist/src/aws-sdk.js:41:14)",
    "    at AwsInstrumentation._onRequire (/opt/nodejs/node_modules/opentelemetry-instrumentation-aws-sdk/node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js:75:39)",
    "    at /opt/nodejs/node_modules/opentelemetry-instrumentation-aws-sdk/node_modules/@opentelemetry/instrumentation/build/src/platform/node/instrumentation.js:115:29",
    "    at Module.Hook._require.Module.require (/opt/nodejs/node_modules/require-in-the-middle/index.js:154:32)",
    "    at Module.Hook._require.Module.require (/opt/nodejs/node_modules/require-in-the-middle/index.js:80:39)",
    "    at Module.Hook._require.Module.require (/opt/nodejs/node_modules/require-in-the-middle/index.js:80:39)",
    "    at Module.Hook._require.Module.require (/opt/nodejs/node_modules/require-in-the-middle/index.js:80:39)"
  ]
}

My setup

I have active tracing enabled.
I have AWS_LAMBDA_EXEC_WRAPPER set to /opt/otel-handler.
I've added the layer arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-ver-0-18-0:1

I'm using CDK to deploy the lambda.
I'm using pure javascript (although many of the modules are using TS).
The node module references both aws-sdk and @AWS-SDK modules.

Other things I've tried

  1. Using the layer
    arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-ver-0-19-0:1
@awssandra
Copy link

awssandra commented Jun 1, 2021

Hey brucedeen,

Looks like this might be an issue on the AWS SDK instumentation itself. That instrumentation library was community contibution, not developed by us.

We'll take a look and see what we can find. Do you have a reproduction case we can take a look at?

Thanks,
Sandra

NathanielRN pushed a commit to NathanielRN/aws-otel-lambda that referenced this issue Jan 27, 2022
@github-actions
Copy link

github-actions bot commented Oct 2, 2022

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

@github-actions github-actions bot added the stale label Oct 2, 2022
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

This issue was closed because it has been marked as stale for 30 days with no activity.

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

No branches or pull requests

2 participants