Class Tracing
X-Ray Tracing Modes (https://docs.aws.amazon.com/lambda/latest/dg/API_TracingConfig.html).
Inheritance
System.Object
Tracing
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class Tracing : Enum
Syntax (vb)
Public NotInheritable Class Tracing
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
var fn = new Function(this, "MyFunction", new FunctionProps {
Runtime = Runtime.NODEJS_18_X,
Handler = "index.handler",
Code = Code.FromInline("exports.handler = function(event, ctx, cb) { return cb(null, \"hi\"); }"),
Tracing = Tracing.ACTIVE
});
Synopsis
Fields
ACTIVE | Lambda will respect any tracing header it receives from an upstream service. |
DISABLED | Lambda will not trace any request. |
PASS_THROUGH | Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1". |
value__ |
Fields
ACTIVE
Lambda will respect any tracing header it receives from an upstream service.
public const Tracing ACTIVE
Field Value
Type | Description |
---|---|
Tracing |
Remarks
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.
DISABLED
Lambda will not trace any request.
public const Tracing DISABLED
Field Value
Type | Description |
---|---|
Tracing |
PASS_THROUGH
Lambda will only trace the request from an upstream service if it contains a tracing header with "sampled=1".
public const Tracing PASS_THROUGH
Field Value
Type | Description |
---|---|
Tracing |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |