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

chore: Refactor example Go stack by splitting a function #302

Closed lym953 closed 1 month ago

lym953 commented 2 months ago

What does this PR do?

Right now NewAppStack() creates a stack and integrates it with Datadog. This PR splits into two functions:

  1. NewAppStackWithoutDatadog(): creates a stack, without Datadog integration
  2. NewAppStackWithDatadog(), which calls NewAppStackWithoutDatadog() and adds Datadog integration

Motivation

I'm going to rename the interfaces like I did in https://github.com/DataDog/datadog-cdk-constructs/pull/288. To make sure both the new API and old API work, I will need to to write two stacks for testing the two APIs. The two stacks will share the non-Datadog setup code, so I'm putting this part in the NewAppStackWithoutDatadog() function.

Testing Guidelines

cdk deploy successfully deploys the Go stack.

Additional Notes

Types of Changes

Check all that apply

lym953 commented 1 month ago

/merge

dd-devflow[bot] commented 1 month ago

:steam_locomotive: MergeQueue: pull request added to the queue

The median merge time in main is 4m.

Use /merge -c to cancel this operation!