Enum AdotLambdaExecWrapper

java.lang.Object
java.lang.Enum<AdotLambdaExecWrapper>
software.amazon.awscdk.services.lambda.AdotLambdaExecWrapper
All Implemented Interfaces:
Serializable, Comparable<AdotLambdaExecWrapper>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-01T20:58:26.427Z") @Stability(Stable) public enum AdotLambdaExecWrapper extends Enum<AdotLambdaExecWrapper>
The wrapper script to be used for the Lambda function in order to enable auto instrumentation with ADOT.

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_18_X)
         .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();
 
  • Enum Constant Details

    • REGULAR_HANDLER

      @Stability(Stable) public static final AdotLambdaExecWrapper REGULAR_HANDLER
      Wrapping regular Lambda handlers.
    • PROXY_HANDLER

      @Stability(Stable) public static final AdotLambdaExecWrapper PROXY_HANDLER
      Wrapping regular handlers (implementing RequestHandler) proxied through API Gateway, enabling HTTP context propagation.
    • STREAM_HANDLER

      @Stability(Stable) public static final AdotLambdaExecWrapper STREAM_HANDLER
      Wrapping streaming handlers (implementing RequestStreamHandler), enabling HTTP context propagation for HTTP requests.
    • INSTRUMENT_HANDLER

      @Stability(Stable) public static final AdotLambdaExecWrapper INSTRUMENT_HANDLER
      Wrapping python lambda handlers see https://aws-otel.github.io/docs/getting-started/lambda/lambda-python.
  • Method Details

    • values

      public static AdotLambdaExecWrapper[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AdotLambdaExecWrapper valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null