@Test public void testExtractOnly() { SpanContext sourceSpanContext = _workItem.getSourceSpan(_mockTracer); assertThat(sourceSpanContext, nullValue()); Span childSpan = _mockTracer .buildSpan("test dangling child") .addReference(References.FOLLOWS_FROM, sourceSpanContext) .start(); try (Scope childScope = _mockTracer.scopeManager().activate(childSpan)) { assert childScope != null; assertThat(childSpan, notNullValue()); assertThat(childSpan, instanceOf(Span.class)); } }
@Nullable @JsonIgnore public SpanContext getSourceSpan() { return getSourceSpan(GlobalTracer.get()); }
WorkItem { @Nullable @JsonIgnore public SpanContext getSourceSpan() { return getSourceSpan(GlobalTracer.get()); } }
WorkItem { @Nullable @JsonIgnore public SpanContext getSourceSpan() { return getSourceSpan(GlobalTracer.get()); } WorkItem(String containerName, String testrigName); @JsonCreator  WorkItem(
      @JsonProperty(PROP_ID) UUID id,
      @JsonProperty(PROP_NETWORK) String network,
      @JsonProperty(PROP_SNAPSHOT) String snapshot,
      @JsonProperty(PROP_REQUEST_PARAMS) Map<String, String> reqParams); }
WorkItem { @Nullable @JsonIgnore public SpanContext getSourceSpan() { return getSourceSpan(GlobalTracer.get()); } WorkItem(String containerName, String testrigName); @JsonCreator  WorkItem(
      @JsonProperty(PROP_ID) UUID id,
      @JsonProperty(PROP_NETWORK) String network,
      @JsonProperty(PROP_SNAPSHOT) String snapshot,
      @JsonProperty(PROP_REQUEST_PARAMS) Map<String, String> reqParams); void addRequestParam(String key, String value); @JsonProperty(PROP_NETWORK) String getNetwork(); @JsonProperty(PROP_ID) UUID getId(); @JsonProperty(PROP_REQUEST_PARAMS) Map<String, String> getRequestParams(); @Nullable @JsonIgnore SpanContext getSourceSpan(); @JsonProperty(PROP_SNAPSHOT) String getSnapshot(); boolean matches(WorkItem workItem); static void setFixedUuid(UUID value); void setSourceSpan(@Nullable Span activeSpan); @Override String toString(); }
WorkItem { @Nullable @JsonIgnore public SpanContext getSourceSpan() { return getSourceSpan(GlobalTracer.get()); } WorkItem(String containerName, String testrigName); @JsonCreator  WorkItem(
      @JsonProperty(PROP_ID) UUID id,
      @JsonProperty(PROP_NETWORK) String network,
      @JsonProperty(PROP_SNAPSHOT) String snapshot,
      @JsonProperty(PROP_REQUEST_PARAMS) Map<String, String> reqParams); void addRequestParam(String key, String value); @JsonProperty(PROP_NETWORK) String getNetwork(); @JsonProperty(PROP_ID) UUID getId(); @JsonProperty(PROP_REQUEST_PARAMS) Map<String, String> getRequestParams(); @Nullable @JsonIgnore SpanContext getSourceSpan(); @JsonProperty(PROP_SNAPSHOT) String getSnapshot(); boolean matches(WorkItem workItem); static void setFixedUuid(UUID value); void setSourceSpan(@Nullable Span activeSpan); @Override String toString();  }