System.out.println("Is trace detached? " + ts1.isDetached()); // co HTraceExample-5-Span Talk to the trace and span instances from within the code. Span span = ts1.getSpan(); System.out.println("Span Time: " + span.getAccumulatedMillis());
@Override public void sync(long txid) throws IOException { if (this.highestSyncedSequence.get() >= txid){ // Already sync'd. return; } TraceScope scope = Trace.startSpan("FSHLog.sync"); try { scope = Trace.continueSpan(publishSyncThenBlockOnCompletion(scope.detach())); } finally { assert scope == NullScope.INSTANCE || !scope.isDetached(); scope.close(); } }
@Override public void sync() throws IOException { TraceScope scope = Trace.startSpan("FSHLog.sync"); try { scope = Trace.continueSpan(publishSyncThenBlockOnCompletion(scope.detach())); } finally { assert scope == NullScope.INSTANCE || !scope.isDetached(); scope.close(); } }
assert scope == NullScope.INSTANCE || !scope.isDetached(); scope.close();
assert scope == NullScope.INSTANCE || !scope.isDetached();