New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@instana/aws-lambda

Package Overview
Dependencies
Maintainers
3
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instana/aws-lambda - npm Package Compare versions

Comparing version 1.120.0 to 1.121.0

8

package.json
{
"name": "@instana/aws-lambda",
"version": "1.120.0",
"version": "1.121.0",
"description": "Instana tracing and monitoring for Node.js based AWS Lambdas",

@@ -60,4 +60,4 @@ "author": {

"dependencies": {
"@instana/core": "1.120.0",
"@instana/serverless": "1.120.0"
"@instana/core": "1.121.0",
"@instana/serverless": "1.121.0"
},

@@ -74,3 +74,3 @@ "devDependencies": {

},
"gitHead": "0d989dde80dd3ea7afc37a81da4db71e1c207c04"
"gitHead": "9e0e2e41fd4e6ec4bb30d04a833314e45edfd768"
}

@@ -209,4 +209,14 @@ /*

identityProvider.init(arnInfo);
backendConnector.init(identityProvider, logger, true, false, 500);
const useLambdaExtension = shouldUseLambdaExtension();
if (useLambdaExtension) {
logger.info('@instana/aws-lambda will use the Instana Lambda extension to send data to the Instana back end.');
} else {
logger.info(
'@instana/aws-lambda will not use the Instana Lambda extension, but instead send data to the Instana back end ' +
'directly.'
);
}
backendConnector.init(identityProvider, logger, true, false, 500, useLambdaExtension);
// instanaCore.init also normalizes the config as a side effect

@@ -221,2 +231,34 @@ instanaCore.init(config, backendConnector, identityProvider);

function shouldUseLambdaExtension() {
if (process.env.INSTANA_DISABLE_LAMBDA_EXTENSION) {
logger.info('INSTANA_DISABLE_LAMBDA_EXTENSION is set, not using the Lambda extension.');
return false;
} else {
const memorySetting = process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE;
if (!memorySetting) {
logger.debug(
'The environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE is not present, cannot determine memory settings.'
);
return true;
}
const memorySize = parseInt(memorySetting, 10);
if (isNaN(memorySize)) {
logger.debug(
`Could not parse the value of the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE: "${memorySetting}", ` +
'cannot determine memory settings, not using the Lambda extension.'
);
return false;
}
if (memorySize < 256) {
logger.debug(
'The Lambda function is configured with less than 256 MB of memory according to the value of ' +
`AWS_LAMBDA_FUNCTION_MEMORY_SIZE: ${memorySetting}. Offloading data via a Lambda extension does currently ` +
'not work reliably with low memory settings, therefore not using the Lambda extension.'
);
return false;
}
return true;
}
}
/**

@@ -223,0 +265,0 @@ * Code to be executed after the promise returned by the original handler has completed.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc