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