AdotInstrumentationConfig
- class aws_cdk.aws_lambda.AdotInstrumentationConfig(*, exec_wrapper, layer_version)
Bases:
object
Properties for an ADOT instrumentation in Lambda.
- Parameters:
exec_wrapper (
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.layer_version (
AdotLayerVersion
) – The ADOT Lambda layer.
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_lambda import AdotLambdaExecWrapper, AdotLayerVersion, AdotLambdaLayerJavaScriptSdkVersion fn = lambda_.Function(self, "MyFunction", runtime=lambda_.Runtime.NODEJS_18_X, handler="index.handler", code=lambda_.Code.from_inline("exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }"), adot_instrumentation=lambda.AdotInstrumentationConfig( layer_version=AdotLayerVersion.from_java_script_sdk_layer_version(AdotLambdaLayerJavaScriptSdkVersion.LATEST), exec_wrapper=AdotLambdaExecWrapper.REGULAR_HANDLER ) )
Attributes
- exec_wrapper
//aws-otel.github.io/docs/getting-started/lambda.
- Type:
The startup script to run, see ADOT documentation to pick the right script for your use case
- Type:
https
- layer_version
The ADOT Lambda layer.