Skip to content

XRay Subsegment In Lambda Constructor Not Appearing in XRay Trace #289

@BradKnowles

Description

@BradKnowles

I'm using XRay in a .NET 6, pure (no ASP.NET), Lambda function and attempting to get insight into initialization performance. Below is a sample of the Function's constructor.

AWSSDKHandler.RegisterXRayForAllServices();
AWSXRayRecorder.InitializeInstance();
_recorder = AWSXRayRecorder.Instance;
_recorder.ContextMissingStrategy = ContextMissingStrategy.LOG_ERROR;

_recorder.BeginSubsegment("Constructor");
... more code...
_recorder.EndSubsegment();

The Constructor subsegment never appears in the XRay Trace. Is there something else needed to have these subsegments appear in XRay.

Package Versions
Amazon.Lambda.Core - 2.1.0
AWSXRayRecorder.Core - 2.14.0
AWSXRayRecorder.Handlers.AwsSdk - 2.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions