in sdk/src/Core/AWSXRayRecorder.netcore.cs [316:343]
public override void EndSubsegment(DateTime? timestamp = null)
{
try
{
if (IsTracingDisabled())
{
_logger.DebugFormat("X-Ray tracing is disabled, do not end subsegment");
return;
}
if (IsLambda())
{
ProcessEndSubsegmentInLambdaContext(timestamp);
}
else
{
ProcessEndSubsegment(timestamp);
}
}
catch (EntityNotAvailableException e)
{
HandleEntityNotAvailableException(e, "Failed to end subsegment because subsegment is not available in trace context.");
}
catch (InvalidCastException e)
{
HandleEntityNotAvailableException(new EntityNotAvailableException("Failed to cast the entity to Subsegment.", e), "Failed to cast the entity to Subsegment.");
}
}