Skip to content
v2.273.0

AdotLambdaLayerJavaScriptSdkVersion Class ​

The collection of versions of the ADOT Lambda Layer for JavaScript SDK.

Note: These are legacy ADOT Lambda layers with an embedded collector.

Example ​

ts
import {
  AdotLambdaExecWrapper,
  AdotLayerVersion,
  AdotLambdaLayerJavaScriptSdkVersion,
} from 'aws-cdk-lib/aws-lambda';

const fn = new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_LATEST,
  handler: 'index.handler',
  code: lambda.Code.fromInline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
  adotInstrumentation: {
    layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST),
    execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
  },
});

Properties ​

The latest layer version available in this CDK version.

New versions could introduce incompatible changes. Make sure to test them before deploying to production.

Methods ​

layerArn(scope: IConstruct, architecture: Architecture): stringdef layer_arn(self, scope: IConstruct, architecture: Architecture) -> strpublic String layerArn(IConstruct scope, Architecture architecture)public string LayerArn(IConstruct scope, Architecture architecture)func LayerArn(Scope IConstruct, Architecture Architecture) *string#
The ARN of the Lambda layer.
2 parameters

Parameters

  • scopescopescopescopeScope — The binding scope.
  • architecturearchitecturearchitecturearchitectureArchitecture — The architecture of the Lambda layer (either X86_64 or ARM_64).