serverless-plugin-tracing
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -17,8 +17,8 @@ 'use strict'; | ||
const providerLevelTracingEnabled = (service.provider.tracing === true); | ||
Object.keys(service.functions).forEach(functionName => { | ||
this.toggleTracing(`${service.service}-${stage}-${functionName}`, | ||
return Promise.all(Object.keys(service.functions).map(functionName => { | ||
return this.toggleTracing(`${service.service}-${stage}-${functionName}`, | ||
(service.functions[functionName].tracing === true) | ||
|| (providerLevelTracingEnabled && service.functions[functionName].tracing !== false) | ||
); | ||
}); | ||
})); | ||
} | ||
@@ -28,3 +28,3 @@ | ||
this.serverless.cli.log(`Tracing ${isEnabled ? 'ENABLED' : 'DISABLED'} for function "${functionName}"`); | ||
this.aws.request('Lambda', 'updateFunctionConfiguration', { | ||
return this.aws.request('Lambda', 'updateFunctionConfiguration', { | ||
FunctionName: functionName, | ||
@@ -31,0 +31,0 @@ TracingConfig: { |
{ | ||
"name": "serverless-plugin-tracing", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Enables AWS X-Ray for entire Serverless stack or individual functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
11468