本文整理汇总了Java中io.opentracing.References.FOLLOWS_FROM属性的典型用法代码示例。如果您正苦于以下问题:Java References.FOLLOWS_FROM属性的具体用法?Java References.FOLLOWS_FROM怎么用?Java References.FOLLOWS_FROM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类io.opentracing.References
的用法示例。
在下文中一共展示了References.FOLLOWS_FROM属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testFindPrimaryReferenceSingleChildOfSpanContextWithOtherRefs
@Test
public void testFindPrimaryReferenceSingleChildOfSpanContextWithOtherRefs() {
Tracer tracer = new APMTracer();
SpanContext spanCtx1 = extractSpanContext(tracer, TEST_APM_ID1);
Reference ref1 = new Reference(References.CHILD_OF, spanCtx1);
Span span2 = tracer.buildSpan("test2").start();
Reference ref2 = new Reference(References.FOLLOWS_FROM, span2.context());
Span span3 = tracer.buildSpan("test3").start();
Reference ref3 = new Reference(References.CHILD_OF, span3.context());
Span span4 = tracer.buildSpan("test4").start();
Reference ref4 = new Reference(References.CHILD_OF, span4.context());
assertEquals(ref1, APMSpan.findPrimaryReference(Arrays.asList(ref1, ref2, ref3, ref4)));
}
示例2: testFindPrimaryReferenceSingleFollowsFrom
@Test
public void testFindPrimaryReferenceSingleFollowsFrom() {
Tracer tracer = new APMTracer();
Span span = tracer.buildSpan("test").start();
Reference ref = new Reference(References.FOLLOWS_FROM, span.context());
assertEquals(ref, APMSpan.findPrimaryReference(Arrays.asList(ref)));
}
示例3: testFindPrimaryReferenceMultipleFollowsFrom
@Test
public void testFindPrimaryReferenceMultipleFollowsFrom() {
Tracer tracer = new APMTracer();
Span span1 = tracer.buildSpan("test1").start();
Reference ref1 = new Reference(References.FOLLOWS_FROM, span1.context());
Span span2 = tracer.buildSpan("test2").start();
Reference ref2 = new Reference(References.FOLLOWS_FROM, span2.context());
assertNull(APMSpan.findPrimaryReference(Arrays.asList(ref1, ref2)));
}