Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step Functions updates #24438

Merged
merged 8 commits into from
Aug 20, 2024
Merged

Step Functions updates #24438

merged 8 commits into from
Aug 20, 2024

Conversation

cswatt
Copy link
Contributor

@cswatt cswatt commented Aug 1, 2024

What does this PR do? What is the motivation?

Merge instructions

  • Please merge after reviewing

Additional notes

@cswatt cswatt added the WORK IN PROGRESS No review needed, it's a wip ;) label Aug 1, 2024
@cswatt cswatt requested review from a team as code owners August 1, 2024 19:00
Copy link
Contributor

github-actions bot commented Aug 1, 2024

- Use the [Datadog Forwarder][6]. For instructions, see the [Setup](#setup) section on this page.
- Use Amazon Firehose. For instructions, see [Send AWS service logs to the Datadog Amazon Data Firehose destination][7].

Datadog uses these ingested logs to generate [enhanced metrics][8] for your Step Function executions.
Copy link
Contributor

@nine5two7 nine5two7 Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cswatt Here is some context that might be helpful to you.

  • Logs are utilized to generate both enhanced metrics and traces.
  • Customers can activate enhanced metrics by adding the DD_ENHANCED_METRICS tag to each of their Step Functions. When only enhanced metrics are enabled, customers are only billed for Serverless Workload Monitoring.
  • Alternatively, customers can enable serverless tracing, which automatically includes enhanced metrics. With serverless tracing, customers are charged for both the Serverless Workload Monitoring and Serverless APM (link to the pricing page), which is calculated based on the count of state transitions.
  • To enable serverless tracing, customers can add the DD_TRACE_ENABLED tag to each Step Function or enable tracing for all Step Functions at the DD Forwarder level (see this PR).

@github-actions github-actions bot added the Images Images are added/removed with this PR label Aug 7, 2024
Datadog AWS Step Functions Monitoring collects logs and integration metrics from the AWS integration and uses ingested logs from AWS Step Functions to generate enhanced metrics and traces for your Step Function executions.
Datadog AWS Step Functions Monitoring makes use of Cloudwatch metrics from the [AWS Step Functions integration][2] and Cloudwatch logs sent through the Datadog Forwarder or Amazon Data Firehose. The latter provides tracing and [enhanced metrics][3].

{{< img src="serverless/step_functions/how_it_works.png" alt="Diagram showing two components of Datadog AWS Step Function monitoring: Cloudwatch metrics sent through the AWS Step Functions integration, and logs, traces, and enhanced metrics sent through the Datadog Lambda Forwarder or Amazon Data Firehose." style="width:100%;" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is:

  1. Logs are sent through the Datadog Lambda Forwarder or Amazon Data Firehose to Datadog. Both Forwarder and Firehose are running in customer's environment.
  2. In Datadog, our internal service converts logs to traces and enhanced metrics.
    I just synced with @jakegreenberg1, and he will update the "how_it_works".png file accordingly.

5. Enable tracing on your Step Function by adding a `DD_TRACE_ENABLED` tag. Set the value to `true`. This is only needed if `DD_STEP_FUNCTIONS_TRACE_ENABLED` hasn't been set by the Forwarder.
6. Set up tags. Open your AWS console and go to your Step Functions state machine. Open the *Tags* section and add `env:<ENV_NAME>` and `service:<SERVICE_NAME>` 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.
7. For Node.js and Python runtimes, you can link your Step Function traces to Lambda traces. On the Lambda Task, set the `Parameters` key with the following:
4. Set up tags. Open your AWS console and go to your Step Functions state machine. Open the *Tags* section and add `env:<ENV_NAME>` and `service:<SERVICE_NAME>` 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customers are also recommended to set the version tag for Step Functions. Without setting this tag, the default value is "1.0".

Copy link
Contributor

@nine5two7 nine5two7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cswatt
Copy link
Contributor Author

cswatt commented Aug 13, 2024

Holding for new image.

Copy link
Contributor

@rtrieu rtrieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michaelcretzman michaelcretzman merged commit db4c2b5 into master Aug 20, 2024
13 of 14 checks passed
@michaelcretzman michaelcretzman deleted the cswatt/step-functions-updates branch August 20, 2024 21:45
@michaelcretzman michaelcretzman removed the WORK IN PROGRESS No review needed, it's a wip ;) label Aug 20, 2024
rtrieu added a commit that referenced this pull request Sep 3, 2024
* starting

* add

* additions

* applying updates

* remove diagram for now

---------

Co-authored-by: Rosa Trieu <rosa.trieu@datadoghq.com>
Co-authored-by: Rosa Trieu <107086888+rtrieu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Images Images are added/removed with this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants