Skip to content

feat(lambda): add tracingMode property to a Function#32320

Closed
ren-yamanashi wants to merge 13 commits intoaws:mainfrom
ren-yamanashi:feat-add-tracing-config
Closed

feat(lambda): add tracingMode property to a Function#32320
ren-yamanashi wants to merge 13 commits intoaws:mainfrom
ren-yamanashi:feat-add-tracing-config

Conversation

@ren-yamanashi
Copy link
Copy Markdown
Contributor

@ren-yamanashi ren-yamanashi commented Nov 28, 2024

Reason for this change

We can set a tracingMode for an Function(Lambda) from cloudformation, but this was not supported in the AWS CDK L2 construct.

Description of changes

Add tracingMode property to FunctionProps and set it in the CfnFunction.

Description of how you validated changes

Added both unit and integration tests.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK label Nov 28, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team November 28, 2024 14:44
@github-actions github-actions bot added the p2 label Nov 28, 2024
@ren-yamanashi ren-yamanashi changed the title feat(lambda): add availabilityZoneDistribution property to an AutoScalingGroup feat(lambda): add tracingConfig property to a Function Nov 28, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.86%. Comparing base (c879b5d) to head (9c36073).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32320   +/-   ##
=======================================
  Coverage   78.86%   78.86%           
=======================================
  Files         108      108           
  Lines        7165     7165           
  Branches     1319     1319           
=======================================
  Hits         5651     5651           
  Misses       1330     1330           
  Partials      184      184           
Flag Coverage Δ
suite.unit 78.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 78.86% <ø> (ø)

*
* To sample and record incoming requests, set tracingMode to Active
*
* @default TracingMode.PASS_THROUGH
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When deployed with tracingMode set to undefined, PassThrough was set, so I assume PassThrough is the default value.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 9c36073
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Dec 19, 2024
@ren-yamanashi ren-yamanashi changed the title feat(lambda): add tracingConfig property to a Function feat(lambda): add tracingMode property to a Function Dec 20, 2024
Copy link
Copy Markdown
Contributor

@mazyu36 mazyu36 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution.
Just one question.

It seems that tracing config has already been implemented. Am I correct?

resource.tracingConfig = this.buildTracingConfig(props.tracing ?? Tracing.ACTIVE);

Please let me know if I'm mistaken.

@ren-yamanashi
Copy link
Copy Markdown
Contributor Author

ren-yamanashi commented Dec 20, 2024

Thank you for the contribution. Just one question.

It seems that tracing config has already been implemented. Am I correct?

resource.tracingConfig = this.buildTracingConfig(props.tracing ?? Tracing.ACTIVE);

Please let me know if I'm mistaken.

@mazyu36

I apologize, I overlooked that implementation...
As you said, it was already implemented, so I would like to close this MR 🙏.

Should I remove pr/needs-community-review label?

@mazyu36
Copy link
Copy Markdown
Contributor

mazyu36 commented Dec 20, 2024

@ren-yamanashi
Thanks.
I think it's fine to just close the PR.

@github-actions
Copy link
Copy Markdown
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2024
@ren-yamanashi ren-yamanashi deleted the feat-add-tracing-config branch November 10, 2025 02:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. repeat-contributor [Pilot] contributed between 3-5 PRs to the CDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants