serverless-plugin-datadog
Advanced tools
Comparing version 2.6.1 to 2.6.2
@@ -15,3 +15,2 @@ "use strict"; | ||
const logForwardingEnvVar = "DD_FLUSH_TO_LOG"; | ||
const ddTracingEnabledEnvVar = "DD_TRACE_ENABLED"; | ||
exports.defaultConfiguration = { | ||
@@ -47,5 +46,2 @@ addLayers: true, | ||
} | ||
if (config.enableDDTracing !== undefined && environment[ddTracingEnabledEnvVar] === undefined) { | ||
environment[ddTracingEnabledEnvVar] = config.enableDDTracing; | ||
} | ||
} | ||
@@ -52,0 +48,0 @@ exports.setEnvConfiguration = setEnvConfiguration; |
@@ -18,8 +18,4 @@ "use strict"; | ||
function addCloudWatchForwarderSubscriptions(service, aws, functionArn) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const resources = (_a = service.provider.compiledCloudFormationTemplate) === null || _a === void 0 ? void 0 : _a.Resources; | ||
if (resources === undefined) { | ||
return ["No cloudformation stack available. Skipping subscribing Datadog forwarder."]; | ||
} | ||
const resources = service.provider.compiledCloudFormationTemplate.Resources; | ||
const errors = []; | ||
@@ -32,7 +28,3 @@ for (const [name, resource] of Object.entries(resources)) { | ||
const scopedSubName = `${name}Subscription`; | ||
let expectedSubName = `${service.getServiceName()}-${aws.getStage()}-${scopedSubName}-`; | ||
const stackName = aws.naming.getStackName(); | ||
if (stackName) { | ||
expectedSubName = `${stackName}-${scopedSubName}-`; | ||
} | ||
const expectedSubName = `${service.getServiceName()}-${aws.getStage()}-${scopedSubName}-`; | ||
const canSub = yield canSubscribeLogGroup(aws, logGroupName, expectedSubName); | ||
@@ -39,0 +31,0 @@ if (!canSub) { |
@@ -44,5 +44,7 @@ "use strict"; | ||
"after:deploy:function:packageFunction": this.afterPackageFunction.bind(this), | ||
"after:invoke:local:invoke": this.afterPackageFunction.bind(this), | ||
"after:package:createDeploymentArtifacts": this.afterPackageFunction.bind(this), | ||
"after:package:initialize": this.beforePackageFunction.bind(this), | ||
"before:deploy:function:packageFunction": this.beforePackageFunction.bind(this), | ||
"before:invoke:local:invoke": this.beforePackageFunction.bind(this), | ||
"before:offline:start:init": this.beforePackageFunction.bind(this), | ||
@@ -49,0 +51,0 @@ "before:step-functions-offline:start": this.beforePackageFunction.bind(this), |
@@ -5,142 +5,142 @@ { | ||
"nodejs8.10": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"us-east-1": { | ||
"nodejs8.10": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"us-west-1": { | ||
"nodejs8.10": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:us-west-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"us-west-2": { | ||
"nodejs8.10": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:us-west-2:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-east-1": { | ||
"nodejs10.x": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-east-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-south-1": { | ||
"nodejs8.10": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-south-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-northeast-2": { | ||
"nodejs8.10": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-northeast-2:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-southeast-1": { | ||
"nodejs8.10": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-southeast-2": { | ||
"nodejs8.10": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-southeast-2:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ap-northeast-1": { | ||
"nodejs8.10": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ap-northeast-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"ca-central-1": { | ||
"nodejs8.10": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:ca-central-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"eu-north-1": { | ||
"nodejs8.10": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:eu-north-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"eu-central-1": { | ||
"nodejs8.10": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:eu-central-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"eu-west-1": { | ||
"nodejs8.10": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:eu-west-1:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"eu-west-2": { | ||
"nodejs8.10": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:eu-west-2:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
"eu-west-3": { | ||
"nodejs8.10": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Node8-10:18", | ||
"nodejs10.x": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Node10-x:29", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Node12-x:29", | ||
"python2.7": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python38:21" | ||
"nodejs10.x": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Node10-x:27", | ||
"nodejs12.x": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:eu-west-3:464622532012:layer:Datadog-Python38:19" | ||
}, | ||
@@ -151,8 +151,8 @@ "sa-east-1": { | ||
"nodejs12.x": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Node12-x:27", | ||
"python2.7": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python27:21", | ||
"python3.6": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python36:21", | ||
"python3.7": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python37:21", | ||
"python3.8": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python38:21" | ||
"python2.7": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python27:19", | ||
"python3.6": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python36:19", | ||
"python3.7": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python37:19", | ||
"python3.8": "arn:aws:lambda:sa-east-1:464622532012:layer:Datadog-Python38:19" | ||
} | ||
} | ||
} |
{ | ||
"name": "serverless-plugin-datadog", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "Serverless plugin to automatically instrument python and node functions with datadog tracing", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -18,2 +18,4 @@ import Service from "serverless/classes/Service"; | ||
export declare function getConfig(service: Service): Configuration; | ||
export declare function forceExcludeDepsFromWebpack(service: Service): void; | ||
export declare function hasWebpackPlugin(service: Service): boolean; | ||
//# sourceMappingURL=env.d.ts.map |
@@ -68,2 +68,42 @@ "use strict"; | ||
exports.getConfig = getConfig; | ||
function forceExcludeDepsFromWebpack(service) { | ||
const includeModules = getPropertyFromPath(service, ["custom", "webpack", "includeModules"]); | ||
if (includeModules === undefined) { | ||
return; | ||
} | ||
let forceExclude = includeModules.forceExclude; | ||
if (forceExclude === undefined) { | ||
forceExclude = []; | ||
includeModules.forceExclude = forceExclude; | ||
} | ||
if (!forceExclude.includes("datadog-lambda-js")) { | ||
forceExclude.push("datadog-lambda-js"); | ||
} | ||
if (!forceExclude.includes("dd-trace")) { | ||
forceExclude.push("dd-trace"); | ||
} | ||
} | ||
exports.forceExcludeDepsFromWebpack = forceExcludeDepsFromWebpack; | ||
function getPropertyFromPath(obj, path) { | ||
for (const part of path) { | ||
let prop = obj[part]; | ||
if (prop === undefined || prop === true) { | ||
prop = {}; | ||
obj[part] = prop; | ||
} | ||
if (prop === false) { | ||
return; | ||
} | ||
obj = prop; | ||
} | ||
return obj; | ||
} | ||
function hasWebpackPlugin(service) { | ||
const plugins = service.plugins; | ||
if (plugins === undefined) { | ||
return false; | ||
} | ||
return plugins.find((plugin) => plugin === "serverless-webpack") !== undefined; | ||
} | ||
exports.hasWebpackPlugin = hasWebpackPlugin; | ||
//# sourceMappingURL=env.js.map |
@@ -82,2 +82,5 @@ "use strict"; | ||
layer_1.applyLayers(this.serverless.service.provider.region, handlers, layers); | ||
if (env_1.hasWebpackPlugin(this.serverless.service)) { | ||
env_1.forceExcludeDepsFromWebpack(this.serverless.service); | ||
} | ||
} | ||
@@ -84,0 +87,0 @@ else { |
{ | ||
"name": "serverless-plugin-datadog", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"description": "Serverless plugin to automatically instrument python and node functions with datadog tracing", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
137406
61
1537