public static Span child(Span s, String d) { if (s == null) { return NullSpan.INSTANCE; } return s.child(d); }
public static Span child(Span s, String d) { if (s == null) { return NullSpan.INSTANCE; } return s.child(d); }
public static Span child(Span s, String d) { if (s == null) { return NullSpan.INSTANCE; } return s.child(d); }
Span child = span.child("child 1"); child.addTimelineAnnotation("timeline annotation"); TracingUtils.addAnnotation(child, "test annotation", 10);
@Override public Span child(String s) { return new Span(span.child(s)); }
protected Span createNew(String description) { Span parent = currentSpan.get(); if (parent == null) { return new MilliSpan(description, /* traceId = */ random.nextLong(), /* parentSpanId = */ Span.ROOT_SPAN_ID, /* spanId = */ random.nextLong(), getProcessId()); } else { return parent.child(description); } }
/** * Starts and returns a new span as the child of the parameter 'parent'. This * will always return a new span, even if tracing wasn't previously enabled for * this thread. * * @param description Description of the span to be created. * @param parent The parent that should be used to create the child span that is to * be returned. * @return */ public static TraceScope startSpan(String description, Span parent) { if (parent == null) return startSpan(description); return continueSpan(parent.child(description)); }