- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
AWS Step Functions is a fully managed service, and the Datadog Agent cannot be directly installed on Step Functions. However, Datadog can monitor Step Functions through Cloudwatch metrics and logs.
Datadog collects Step Functions metrics from Cloudwatch through the AWS Step Functions integration. Datadog collects Step Functions logs from Cloudwatch through one of the following:
Datadog uses these ingested logs to generate enhanced metrics and traces for your Step Function executions.
Ensure that the AWS Step Functions integration is installed.
Then, to send your Step Functions logs to Datadog:
For developers using Serverless Framework to deploy serverless applications, use the Datadog Serverless Framework Plugin.
If you have not already, install the Datadog Serverless Framework Plugin v5.40.0+:
serverless plugin install --name serverless-plugin-datadog
Ensure you have deployed the Datadog Lambda Forwarder, a Lambda function that ships logs from AWS to Datadog, and that you are using v3.121.0+. You may need to update your Forwarder.
Take note of your Forwarder’s ARN.
Add the following to your serverless.yml
:
custom:
datadog:
site: <DATADOG_SITE>
apiKeySecretArn: <DATADOG_API_KEY_SECRET_ARN>
forwarderArn: <FORWARDER_ARN>
enableStepFunctionsTracing: true
<DATADOG_SITE>
with
(ensure the correct SITE is selected on the right).<DATADOG_API_KEY_SECRET_ARN>
with the ARN of the AWS secret where your Datadog API key is securely stored. The key needs to be stored as a plaintext string (not a JSON blob). The secretsmanager:GetSecretValue
permission is required. For quick testing, you can instead use apiKey
and set the Datadog API key in plaintext.<FORWARDER_ARN>
with the ARN of your Datadog Lambda Forwarder, as noted previously.For additional settings, see Datadog Serverless Framework Plugin - Configuration parameters.
If you have not already, install the Datadog CLI v2.18.0+.
npm install -g @datadog/datadog-ci
Ensure you have deployed the Datadog Lambda Forwarder, a Lambda function that ships logs from AWS to Datadog, and that you are using v3.121.0+. You may need to update your Forwarder.
Take note of your Forwarder’s ARN.
Instrument your Step Function.
datadog-ci stepfunctions instrument \
--step-function <STEP_FUNCTION_ARN> \
--forwarder <FORWARDER_ARN> \
--env <ENVIRONMENT>
<STEP_FUNCTION_ARN>
with the ARN of your Step Function. Repeat the --step-function
flag for each Step Function you wish to instrument.<FORWARDER_ARN>
with the ARN of your Datadog Lambda Forwarder, as noted previously.<ENVIRONMENT>
with the environment tag you would like to apply to your Step Functions.For more information about the datadog-ci stepfunctions
command, see the Datadog CLI documentation.
Enable all logging for your Step Function. In your AWS console, open your state machine. Click Edit and find the Logging section. There, set Log level to ALL
and enable the Include execution data checkbox.
Ensure you have deployed the Datadog Lambda Forwarder, a Lambda function that ships logs from AWS to Datadog, and that you are using v3.121.0+. You may need to update your Forwarder. When deploying the Forwarder on v3.121.0+, you can also set the DdStepFunctionsTraceEnabled
parameter in CloudFormation to enable tracing for all your Step Functions at the Forwarder-level.
Take note of your Forwarder’s ARN.
Subscribe CloudWatch logs to the Datadog Lambda Forwarder. To do this, you have two options:
Datadog-AWS integration (recommended)
Note: Log Autosubscription requires your Lambda Forwarder and Step Function to be in the same region.
Manual
/aws/vendedlogs/states
.CloudWatch Logs
./aws/vendedlogs/states/my-state-machine
.env:<ENV_NAME>
, service:<SERVICE_NAME>
, and version:<VERSION>
tags. The env
tag is required to see traces in Datadog, and it defaults to dev
. The service
tag defaults to the state machine’s name. The version
tag defaults to 1.0
.Datadog generates traces from collected Cloudwatch logs. To enable this, add a DD_TRACE_ENABLED
tag to each of your Step Functions and set the value to true
. Alternatively, to enable tracing for all your Step Functions, add a DD_STEP_FUNCTIONS_TRACE_ENABLED
environment variable to the Datadog Forwarder and set the value to true
.
Enhanced metrics are automatically enabled if you enable tracing.
See Merge Step Functions traces with Lambda traces. Ensure that you have also set up Serverless Monitoring for AWS Lambda.
To manage the APM traced invocation sampling rate for serverless functions, set the DD_TRACE_SAMPLE_RATE
environment variable on the function to a value between 0.000 (no tracing of Step Function invocations) and 1.000 (trace all Step Function invocations).
The dropped traces are not ingested into Datadog.
Datadog generates enhanced metrics from collected Cloudwatch logs. Enhanced metrics are automatically enabled if you enable traces.
To enable enhanced metrics without enabling tracing, add a DD_ENHANCED_METRICS
tag to each of your Step Functions and set the value to true
.
After you have invoked your state machine, go to the Serverless app in Datadog. Search for service:<YOUR_STATE_MACHINE_NAME>
to see the relevant metrics, logs, and traces associated with that state machine. If you set the service
tag on your state machine to a custom value, search for service:<CUSTOM_VALUE>
.
If you cannot see your traces, see Troubleshooting.