-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-stepfunctionsRelated to AWS StepFunctionsRelated to AWS StepFunctionsbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp3
Description
Describe the bug
When I have a StateMachine with X-Ray tracing is enabled,
Setting tracingEnabled to false does not disable X-Ray tracing.
Expected Behavior
Changing tracingEnabled from true to false disables X-Ray tracing.
Current Behavior
Changing tracingEnabled to false does not modify X-Ray tracing.
Reproduction Steps
First deploy a StateMachine with tracingEnabled: true.
The stack creates an StateMacine with X-Ray tracing enabled.
new sfn.StateMachine(stack, 'StateMachine', {
definitionBody: sfn.DefinitionBody.fromChainable(...),
tracingEnabled: true,
});Then, change tracingEnabled: false and deploy again.
X-Ray tracing is still enabled.
new sfn.StateMachine(stack, 'StateMachine', {
definitionBody: sfn.DefinitionBody.fromChainable(...),
tracingEnabled: false,
});Possible Solution
When tracingEnabled is explictly false, render "TrancingConfiguration": {"Enabled": false} in template instead of undefined.
Additional Information/Context
Workaround: Following escape hatch can diable X-Ray tracing.
const machine = new sfn.StateMachine(stack, 'StateMachine', {
definitionBody: sfn.DefinitionBody.fromChainable(...),
tracingEnabled: false,
});
(machine.node.defaultChild as cdk.CfnResource).addPropertyOverride('TracingConfiguration', { Enabled: false });CDK CLI Version
2.148.0
Framework Version
No response
Node.js Version
20.15.1
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-stepfunctionsRelated to AWS StepFunctionsRelated to AWS StepFunctionsbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp3