aws-cdk-lib.aws_lambda.AdotInstrumentationConfig

interface AdotInstrumentationConfig

LanguageType name
.NETAmazon.CDK.AWS.Lambda.AdotInstrumentationConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#AdotInstrumentationConfig
Javasoftware.amazon.awscdk.services.lambda.AdotInstrumentationConfig
Pythonaws_cdk.aws_lambda.AdotInstrumentationConfig
TypeScript (source)aws-cdk-lib » aws_lambda » AdotInstrumentationConfig

Properties for an ADOT instrumentation in Lambda.

Example

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

const fn = new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_18_X,
  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

NameTypeDescription
execWrapperAdotLambdaExecWrapperThe startup script to run, see ADOT documentation to pick the right script for your use case: https://aws-otel.github.io/docs/getting-started/lambda.
layerVersionAdotLayerVersionThe ADOT Lambda layer.

execWrapper

Type: AdotLambdaExecWrapper

The startup script to run, see ADOT documentation to pick the right script for your use case: https://aws-otel.github.io/docs/getting-started/lambda.


layerVersion

Type: AdotLayerVersion

The ADOT Lambda layer.