-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
I'm using Xray in async context and I noticed than when async subsegment is closed it will still be a parent for new subsegments. The expected behavior is that when a subsegment is closed it will be popped from the context.
@Test
void incorrectParrentForAsyncSubsegment() {
Segment parent = AWSXRay.beginSegment("parent");
Subsegment child1 = AWSXRay.beginSubsegment("child1");
AWSXRay.endSubsegment(child1);
Subsegment child2 = AWSXRay.beginSubsegment("child2");
// this passes, but it's incorrect the 'child1' was already closed when child2 was started
assertEquals(child2.getParent(), child1);
// this fails
assertEquals(child2.getParent(), parent);
}
Metadata
Metadata
Assignees
Labels
No labels