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.
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]
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]
Argument | Shorthand | 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. | ||
--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 |
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 |
- Install the Datadog CLI
See How to install the CLI for instructions to install the Datadog CLI.
- 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.
For product feedback and questions, join the #serverless
channel in the Datadog community on Slack.