当前位置: 首页>>代码示例>>Java>>正文


Java References.FOLLOWS_FROM属性代码示例

本文整理汇总了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)));
}
 
开发者ID:hawkular,项目名称:hawkular-apm,代码行数:18,代码来源:APMSpanTest.java

示例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)));
}
 
开发者ID:hawkular,项目名称:hawkular-apm,代码行数:8,代码来源:APMSpanTest.java

示例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)));
}
 
开发者ID:hawkular,项目名称:hawkular-apm,代码行数:9,代码来源:APMSpanTest.java


注:本文中的io.opentracing.References.FOLLOWS_FROM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。