@Test public void startLocalTrace() throws Exception { try (CloseableTrace trace = CloseableTrace.startLocalTrace("service", "method({})", "foo")) { assertNotNull(trace); } List<Span> spans = observer.spans(); assertThat(spans, hasSize(1)); assertThat(spans.get(0).getOperation(), equalTo("service.method(foo)")); }
public static CloseableTrace startLocalTrace(String serviceName, CharSequence operationFormat, Object... formatArguments) { if (Tracer.isTraceObservable()) { return startLocalTrace("{}." + operationFormat, ObjectArrays.concat(serviceName, formatArguments)); } return noOp(); }
CloseableTrace implements AutoCloseable { public static CloseableTrace startLocalTrace(String serviceName, CharSequence operationFormat, Object... formatArguments) { if (Tracer.isTraceObservable()) { return startLocalTrace("{}." + operationFormat, ObjectArrays.concat(serviceName, formatArguments)); } return noOp(); } }
CloseableTrace implements AutoCloseable { public static CloseableTrace startLocalTrace(String serviceName, CharSequence operationFormat, Object... formatArguments) { if (Tracer.isTraceObservable()) { return startLocalTrace("{}." + operationFormat, ObjectArrays.concat(serviceName, formatArguments)); } return noOp(); } private  CloseableTrace(@Nullable OpenSpan trace); }
CloseableTrace implements AutoCloseable { public static CloseableTrace startLocalTrace(String serviceName, CharSequence operationFormat, Object... formatArguments) { if (Tracer.isTraceObservable()) { return startLocalTrace("{}." + operationFormat, ObjectArrays.concat(serviceName, formatArguments)); } return noOp(); } private  CloseableTrace(@Nullable OpenSpan trace); @Override void close(); static CloseableTrace noOp(); static CloseableTrace startLocalTrace(String serviceName,
            CharSequence operationFormat,
            Object... formatArguments); }
CloseableTrace implements AutoCloseable { public static CloseableTrace startLocalTrace(String serviceName, CharSequence operationFormat, Object... formatArguments) { if (Tracer.isTraceObservable()) { return startLocalTrace("{}." + operationFormat, ObjectArrays.concat(serviceName, formatArguments)); } return noOp(); } private  CloseableTrace(@Nullable OpenSpan trace); @Override void close(); static CloseableTrace noOp(); static CloseableTrace startLocalTrace(String serviceName,
            CharSequence operationFormat,
            Object... formatArguments);  }