DataDog / datadog-cloudformation-macro

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

[serverless] Tag lambdas provisioned with CDK #18

Closed Czechh closed 4 years ago

Czechh commented 4 years ago

What does this PR do?

Adds a tag lambda:createdBy with the value CDK for lambdas that are provisioned with the AWS CDK. It follows the same tag key as SAM

Motivation

Serverless telemetry

Testing Guidelines

Additional Notes

Types of changes

Check all that apply

tianchu commented 4 years ago

I'm a little bit concerned that this may mislead people to think this tag is created by AWS, also wondering if this would cause some conflict in the future if AWS does decide to tag something like this. Perhaps we should let macro add these two tags for consistency dd_sls_macro_by:sam (despite the fact that AWS already add a tag for SAM created function) and dd_sls_macro_by:cdk?

codecov-io commented 4 years ago

Codecov Report

Merging #18 into master will increase coverage by 0.50%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   88.66%   89.16%   +0.50%     
==========================================
  Files           7        7              
  Lines         344      360      +16     
  Branches       81       85       +4     
==========================================
+ Hits          305      321      +16     
  Misses         20       20              
  Partials       19       19              
Impacted Files Coverage Δ
serverless/src/index.ts 90.74% <100.00%> (+0.54%) :arrow_up:
serverless/src/tags.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cac9bb0...e48e68d. Read the comment docs.

Czechh commented 4 years ago

@tianchu pushed the change for adding a brand new tag:

Testing with SAM: image)

Testing with CDK: image

Please re-review