Open jbreckel opened 16 hours ago
Hey @jbreckel thanks for writing in! Are you running your lambda function in ESM or CJS? Can you confirm that all your @sentry/*
packages are aligned to exactly the same version?
lambdas are running CJS, NodejsFunction
definition:
new lambdaNodeJs.NodejsFunction(
this,
`SomeLambda`,
{
functionName: `${this.prefix}-some-lambda`,
entry: `src/aws/lambda/some-lambda.ts`,
runtime: lambda.Runtime.NODEJS_20_X,
logRetention: logs.RetentionDays.ONE_WEEK,
architecture: lambda.Architecture.ARM_64,
bundling: {
loader: {
'.node': 'file',
},
commandHooks: {
beforeBundling: () => [],
beforeInstall: () => [],
afterBundling: (_, outputDir) => [
`sentry-prune-profiler-binaries --target_platform=linux --target_arch=arm64 --target_node=20 --target_stdlib=glibc --target_dir_path=${outputDir}`,
],
},
},
environment: {
SENTRY_ENV: this.awsStage,
SENTRY_RELEASE: `${this.prefix}-${this.awsStage}`,
SENTRY_DSN: Context.tryGetContext<string>(
this.node,
'sentryDSN'
),
},
}
);
Yes, they are all pinned @8.41.0
in package-lock.json
.
Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/node
SDK Version
8.41.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
AWS Lambda Node 20
Steps to Reproduce
Expected Result
get a reproducible result. ~ 4 out of 10 times the below described error gets thrown
Actual Result
sometimes a
TypeError
is thrown, most times not