@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ServerTracer) { ServerTracer that = (ServerTracer) o; return (this.recorder.equals(that.recorder())) && (this.currentSpan.equals(that.currentSpan())) && (this.spanFactory.equals(that.spanFactory())); } return false; }
/** * Sets the current Trace/Span state. Using this method indicates that we got no information about being part of an * existing trace or about the fact that we should not trace the current request. In this case the ServerTracer will * decide what to do. * * @param spanName The name of our current request/span. */ public void setStateUnknown(String spanName) { Span span = spanFactory().nextSpan(null); setStateCurrentTrace(span, spanName); }
/** * Sets the current Trace/Span state. Using this method indicates we are part of an existing trace/span. * * @param context includes the trace identifiers extracted from the wire * @param spanName should not be empty or <code>null</code>. * @see ServerTracer#setStateNoTracing() * @see ServerTracer#setStateUnknown(String) */ public void setStateCurrentTrace(SpanId context, String spanName) { Span span = spanFactory().joinSpan(context); setStateCurrentTrace(span, spanName); }
LOGGER.fine("Received span information as part of request."); span = serverTracer.spanFactory().joinSpan(traceData.getSpanId()); } else { LOGGER.fine("Received no span state."); span = serverTracer.spanFactory().nextSpan(null);