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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:56:01.176Z") @Stability(Stable) public enum Tracing extends Enum<Tracing>
X-Ray Tracing Modes (https://docs.aws.amazon.com/lambda/latest/dg/API_TracingConfig.html).

Example:

 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\"); }"))
         .tracing(Tracing.ACTIVE)
         .build();
 
  • Enum Constant Details

    • ACTIVE

      @Stability(Stable) public static final Tracing ACTIVE
      Lambda will respect any tracing header it receives from an upstream service.

      If no tracing header is received, Lambda will sample the request based on a fixed rate. Please see the Using AWS Lambda with AWS X-Ray documentation for details on this sampling behavior.

    • PASS_THROUGH

      @Stability(Stable) public static final Tracing PASS_THROUGH
      Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1".
    • DISABLED

      @Stability(Stable) public static final Tracing DISABLED
      Lambda will not trace any request.
  • Method Details

    • values

      public static Tracing[] 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 Tracing 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