serverless-step-functions
Advanced tools
Comparing version 2.24.0 to 2.25.0
@@ -102,2 +102,3 @@ 'use strict'; | ||
let LoggingConfiguration; | ||
let TracingConfiguration; | ||
let Tags; | ||
@@ -208,2 +209,7 @@ if (stateMachineObj.inheritGlobalTags === false) { | ||
if (value.tracingConfig) { | ||
TracingConfiguration = { | ||
Enabled: value.tracingConfig.enabled, | ||
}; | ||
} | ||
@@ -220,2 +226,3 @@ const stateMachineOutputLogicalId = this | ||
LoggingConfiguration, | ||
TracingConfiguration, | ||
}, | ||
@@ -222,0 +229,0 @@ DependsOn, |
@@ -37,2 +37,6 @@ const Joi = require('@hapi/joi'); | ||
const tracingConfig = Joi.object().keys({ | ||
enabled: Joi.boolean().default(false), | ||
}); | ||
const id = Joi.string(); | ||
@@ -62,2 +66,3 @@ const tags = Joi.object(); | ||
loggingConfig, | ||
tracingConfig, | ||
inheritGlobalTags, | ||
@@ -64,0 +69,0 @@ }); |
@@ -1437,2 +1437,38 @@ 'use strict'; | ||
it('should compile tracing configuration', () => { | ||
serverless.service.stepFunctions = { | ||
stateMachines: { | ||
myStateMachine1: { | ||
name: 'stateMachineBeta1', | ||
tracingConfig: { | ||
enabled: true, | ||
}, | ||
definition: { | ||
StartAt: 'A', | ||
States: { | ||
A: { | ||
Type: 'Task', | ||
Resource: 'arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:hello', | ||
End: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
serverlessStepFunctions.compileStateMachines(); | ||
const actual = serverlessStepFunctions | ||
.serverless | ||
.service | ||
.provider | ||
.compiledCloudFormationTemplate | ||
.Resources | ||
.StateMachineBeta1 | ||
.Properties; | ||
expect(actual).to.haveOwnProperty('TracingConfiguration'); | ||
expect(actual.TracingConfiguration.Enabled).to.equal(true); | ||
}); | ||
it('should output cloudformation outputs section', () => { | ||
@@ -1439,0 +1475,0 @@ serverless.service.stepFunctions = { |
{ | ||
"name": "serverless-step-functions", | ||
"version": "2.24.0", | ||
"version": "2.25.0", | ||
"description": "The module is AWS Step Functions plugin for Serverless Framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -21,2 +21,3 @@ # Serverless Step Functions | ||
- [CloudWatch Logs](#cloudwatch-logs) | ||
- [X-Ray](#x-ray) | ||
- [Current Gotcha](#current-gotcha) | ||
@@ -411,2 +412,14 @@ - [Events](#events) | ||
### X-Ray | ||
You can enable X-Ray for your state machine, specify `tracingConfig` as shown below. | ||
```yaml | ||
stepFunctions: | ||
stateMachines: | ||
hellostepfunc1: | ||
tracingConfig: | ||
enabled: true | ||
``` | ||
## Current Gotcha | ||
@@ -413,0 +426,0 @@ |
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
520773
12631
1579