This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
import*assfnfrom"aws-cdk-lib/aws-stepfunctions";import{DatadogStepFunctions}from"datadog-cdk-constructs-v2";conststateMachine=newsfn.StateMachine(...);constdatadogSfn=newDatadogStepFunctions(this,"DatadogSfn",{env:"<ENV>",// e.g. "dev"
service:"<SERVICE>",// e.g. "my-cdk-service"
version:"<VERSION>",// e.g. "1.0.0"
forwarderArn:"<FORWARDER_ARN>",// e.g. "arn:test:forwarder:sa-east-1:12345678:1"
tags:<TAGS>,// optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2"
});datadogSfn.addStateMachines([stateMachine]);
fromaws_cdkimport(aws_stepfunctionsassfn,aws_stepfunctions_tasksastasks,)fromdatadog_cdk_constructs_v2importDatadogStepFunctions,DatadogLambdastate_machine=sfn.StateMachine(...)datadog_sfn=DatadogStepFunctions(self,"DatadogSfn",env="<ENV>",# e.g. "dev"service="<SERVICE>",# e.g. "my-cdk-service"version="<VERSION>",# e.g. "1.0.0"forwarderArn="<FORWARDER_ARN>",# e.g. "arn:test:forwarder:sa-east-1:12345678:1"tags=<TAGS>,# optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2")datadog_sfn.add_state_machines([child_state_machine,parent_state_machine])
import("github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct""github.com/aws/aws-cdk-go/awscdk/v2"sfn"github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions")stack:=awscdk.NewStack(...)stateMachine:=sfn.NewStateMachine(...)datadogSfn:=ddcdkconstruct.NewDatadogStepFunctions(stack,jsii.String("DatadogSfn"),&ddcdkconstruct.DatadogStepFunctionsProps{Env:jsii.String("<ENV>"),// e.g. "dev"
Service:jsii.String("<SERVICE>"),// e.g. "my-cdk-service"
Version:jsii.String("<VERSION>"),// e.g. "1.0.0"
ForwarderArn:jsii.String("<FORWARDER_ARN>"),// e.g. "arn:test:forwarder:sa-east-1:12345678:1"
Tags:jsii.String("<TAGS>"),// optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2"
})datadogSfn.AddStateMachines(&[]sfn.StateMachine{stateMachine},nil)
Merging traces
To merge the Step Function’s traces with downstream Lambda function or Step Function traces, modify the Lambda task payload or Step Function task input: