DataDog / datadog-cloudformation-macro

CloudFormation Macros by Datadog
Apache License 2.0
14 stars 22 forks source link

Honor DD_MERGE_XRAY_TRACES from Function Environment #70

Closed BlissfulDarkness closed 2 years ago

BlissfulDarkness commented 2 years ago

What does this PR do?

When using the default values, if X-Ray Tracing is being managed separately from the DataDog Serverless Macro, keep the existing value.

This at least partially resolves #69 by keeping the Environment Variable from the template if you ONLY enable DataDog Tracking through the Macro, leaving X-Ray Tracing to be unaffected

Motivation

This is blocking our use of the newer version of the Datadog Serverless Macro

Testing Guidelines

Updated tracing.spec.ts with an example resource based on the actual resource generated in CloudFormation. Added unit test for this specific scenario.

Additional Notes

Types of changes

Check all that apply

tianchu commented 2 years ago

See https://github.com/DataDog/datadog-cloudformation-macro/issues/69#issuecomment-1155708407

tianchu commented 2 years ago

Closing in favor of what's proposed in https://github.com/DataDog/datadog-cloudformation-macro/issues/69#issuecomment-1155708407.