DataDog / datadog-cdk-constructs

CDK construct library to automagically instrument your Lambda functions with Datadog
Apache License 2.0
65 stars 28 forks source link

feat: add skeleton of step function class and example stack #315

Closed lym953 closed 4 weeks ago

lym953 commented 1 month ago

What does this PR do?

This is the same PR as https://github.com/DataDog/datadog-cdk-constructs/pull/290. I messed up with Git branches, so that PR was closed but not merged into main. Let's do that PR again.

  1. Add a skeleton of DatadogStepFunctions class, which users will use to add Datadog monitoring for their Step Functions
  2. Add an example TypeScript stack showing how to use this class in a CDK
    • a large part of the stack was copied from the existing TypeScript stack for Lambda functions

Motivation

For SVLS-4394: Customers can instrument their Step Functions with CDK macro and SAM

Testing Guidelines

Followed the internal wiki for testing local changes to CDK Construct

After cdk deploy, a CloudFormation stack was deployed successfully, which includes a Lambda function and a Step Function, though Datadog monitoring is not set up for them.

Additional Notes

Please comment on naming. I'm using:

  1. DatadogStepFunctions as the class name
  2. addStateMachines() as the function name

Let me know if you prefer to use:

  1. the singular form (without s), and/or
  2. addStepFunctions() instead of addStateMachines()

Next steps:

  1. Implement DatadogStepFunctions class, make it do various work needed to set up Datadog monitoring. I'll do this in small steps, sending small PRs.
  2. After the TypeScript stack fully works, create an example for Step Functions in Go and Python.

Types of Changes

Check all that apply

lym953 commented 4 weeks ago

/merge

dd-devflow[bot] commented 4 weeks ago

:steam_locomotive: MergeQueue: pull request added to the queue

The median merge time in main is 5m.

Use /merge -c to cancel this operation!