Interface AdotInstrumentationConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AdotInstrumentationConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-08-13T16:20:08.674Z")
@Stability(Stable)
public interface AdotInstrumentationConfig
extends software.amazon.jsii.JsiiSerializable
Properties for an ADOT instrumentation in Lambda.
Note: This uses the legacy ADOT Lambda layers that bundle an embedded collector.
For the recommended optimized ADOT Lambda layers (the AWSOpenTelemetryDistro* family),
add the layer via Function.addLayers() and set the AWS_LAMBDA_EXEC_WRAPPER
environment variable to /opt/otel-instrument instead.
Example:
import software.amazon.awscdk.services.lambda.AdotLambdaExecWrapper;
import software.amazon.awscdk.services.lambda.AdotLayerVersion;
import software.amazon.awscdk.services.lambda.AdotLambdaLayerJavaScriptSdkVersion;
Function fn = Function.Builder.create(this, "MyFunction")
.runtime(Runtime.NODEJS_LATEST)
.handler("index.handler")
.code(Code.fromInline("exports.handler = function(event, ctx, cb) { return cb(null, \"hi\"); }"))
.adotInstrumentation(AdotInstrumentationConfig.builder()
.layerVersion(AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST))
.execWrapper(AdotLambdaExecWrapper.REGULAR_HANDLER)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAdotInstrumentationConfigstatic final classAn implementation forAdotInstrumentationConfig -
Method Summary
Modifier and TypeMethodDescriptionbuilder()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.The ADOT Lambda layer.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getExecWrapper
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. -
getLayerVersion
The ADOT Lambda layer. -
builder
- Returns:
- a
AdotInstrumentationConfig.BuilderofAdotInstrumentationConfig
-