Skip to content

Latest commit

 

History

History

stepfunctions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

stepfunctions commands

You can use the stepfunctions instrument command to instrument your Step Functions with Datadog. This command enables instrumentation by subscribing Step Function logs to a Datadog Forwarder.

You can also add the stepfunctions instrument command to your CI/CD pipelines to enable Datadog instrumentation for all of your Step Functions. Run the command after your normal serverless application deployment, so that changes made by this command do not get overridden by changes in the CI/CD pipeline.

Usage

instrument

Run the instrument command to subscribe a Step Function log group to the specified Datadog Forwarder. In the Step Function logging configuration, if either logLevel: ALL or includeExecutionData: true is not set, then the Step Function logging configuration will be updated to use those settings.

If logging is not enabled on a Step Function, a log group will be created and the Step Function will be updated to log to it with logLevel: ALL and includeExecutionData: true. Note that the Step Function needs permission to log to CloudWatch logs. See Step Function Logging using CloudWatch Logs for the specific permissions needed.

datadog-ci stepfunctions instrument --step-function <step-function-arn> --forwarder <forwarder-arn> [--service] [--env] [--dry-run]

uninstrument

Run the uninstrument command to unsubscribe a Step Function log group from the specified Datadog Forwarder. The log group will not be deleted and the Step Function will continue to log to the AWS log group.

datadog-ci stepfunctions uninstrument --step-function <step-function-arn> --forwarder <forwarder-arn> [--dry-run]

Arguments

instrument

Argument Shorthand Description Default
--step-function -s The ARN of the Step Function to be instrumented. Repeat --step-function to instrument multiple Step Functions.
--forwarder The ARN of the Datadog Forwarder to subscribe Step Function log groups.
--env -e Separate your staging, development, and production environments by env. Learn more about Serverless Tagging. ** Optional if env tag is already set on Step Functions
--service Group Step Functions belonging to similar workloads by service. Learn more about Serverless Tagging.
--dry-run -d Preview changes without applying them. false
--propagate-upstream-trace Update Step Function definitions to inject context into invocations to other Step Functions or Lambda functions. false

uninstrument

Argument Shorthand Required Description Default
--step-function -s The ARN of the Step Function to be instrumented.
--forwarder The ARN of the Datadog Forwarder to subscribe Step Function log groups.
--dry-run -d Preview changes without applying them. false

Installation

  1. Install the Datadog CLI

See How to install the CLI for instructions to install the Datadog CLI.

  1. Configure your AWS Credentials

Datadog CLI depends on the AWS JavaScript SDK to resolve AWS credentials. Ensure your AWS credentials are configured using the same method you would use when invoking the AWS CLI.

Community

For product feedback and questions, join the #serverless channel in the Datadog community on Slack.

Further reading

Additional helpful documentation, links, and articles: