Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-lambda): when tracing set to disabled after being enabled, only active tracing is disabled not enhanced monitoring #28526

Closed
paulsjohnson91 opened this issue Dec 29, 2023 · 1 comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@paulsjohnson91
Copy link

paulsjohnson91 commented Dec 29, 2023

Describe the bug

Using the aws cdk Java with a singleton function of form:

SingletonFunction.Builder.create(
          parent, String.format("%s-lambda-%s", name, environments[i]))
  .functionName(String.format("ca-%s-%s", name, environments[i]))
  .code(
          Code.fromAsset(
                  String.format(
                          "src/main/resources/%s/%s", environments[i], location)))
  .handler("index.handler")
  .timeout(Duration.seconds(15))
  .memorySize(memory)
  .environment(new Environment().environmentalVariables(i))
  .layers(List.of(
                  LayerVersion.fromLayerVersionArn(parent, "layerarn" + name + environments[i], StringParameter.valueForStringParameter(parent, EnvironmentSSMKeys[i])),
                  LayerVersion.fromLayerVersionArn(parent, "layerarninsights" + name + environments[i], "arn:aws:lambda:eu-west-1:<acc>:layer:LambdaInsightsExtension:16")))
  .runtime(sharedResourceStack.getNodeVersion().get(environments[i]))
  .role(sharedResourceStack.lambdaRole)
  .tracing(Tracing.DISABLED)
  .profiling(false)
  .uuid(String.format("ca-%s-uuid-%s", name, environments[i]))
  .build());

previously I had Tracing.ACTIVE set but now want to disable all extra monitoring.

When you deploy with tracing disabled now it disables active tracing but leaves enhanced monitoring active.

Expected Behavior

Enhanced monitoring should also be disabled.

Current Behavior

Enhanced monitoring is enabled

Reproduction Steps

Use code provided above

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.115.0 (build 58027ee)

Framework Version

No response

Node.js Version

18

OS

osx

Language

Java

Language Version

No response

Other information

No response

@paulsjohnson91 paulsjohnson91 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 29, 2023
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Dec 29, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant