@Test public void testServiceName() { String expected = "service-name"; Span span = new Tracer.Builder(metrics, expected, dispatcher).build().buildSpan(expected).start(); Assert.assertEquals(expected, span.getServiceName()); }
public String getServiceName() { synchronized (this) { return getTracer().getServiceName(); } }
Span implements io.opentracing.Span { public String getServiceName() { synchronized (this) { return getTracer().getServiceName(); } } }
Span implements io.opentracing.Span { public String getServiceName() { synchronized (this) { return getTracer().getServiceName(); } } Span(Tracer tracer, Clock clock, String operationName, SpanContext context, long startTime, Map<String, Object> tags, List<Reference> references); }
Span implements io.opentracing.Span { public String getServiceName() { synchronized (this) { return getTracer().getServiceName(); } } Span(Tracer tracer, Clock clock, String operationName, SpanContext context, long startTime, Map<String, Object> tags, List<Reference> references); @Override String toString(); @Override void finish(); @Override void finish(long finishMicros); Long getDuration(); Long getStartTime(); Tracer getTracer(); @Override SpanContext context(); String getServiceName(); String getOperationName(); @Override Span setOperationName(String operationName); @Override Span setBaggageItem(String key, String value); @Override String getBaggageItem(String key); Map<String, String> getBaggageItems(); @Override Span setTag(String key, Number value); @Override io.opentracing.Span setTag(Tag<T> tag, T value); @Override Span setTag(String key, boolean value); @Override Span setTag(String key, String value); Map<String, Object> getTags(); @Override Span log(long timestampMicroseconds, Map<String, ?> fields); @Override Span log(long timestampMicroseconds, String event); @Override Span log(Map<String, ?> fields); @Override Span log(String event); List<LogData> getLogs(); }
Span implements io.opentracing.Span { public String getServiceName() { synchronized (this) { return getTracer().getServiceName(); } } Span(Tracer tracer, Clock clock, String operationName, SpanContext context, long startTime, Map<String, Object> tags, List<Reference> references); @Override String toString(); @Override void finish(); @Override void finish(long finishMicros); Long getDuration(); Long getStartTime(); Tracer getTracer(); @Override SpanContext context(); String getServiceName(); String getOperationName(); @Override Span setOperationName(String operationName); @Override Span setBaggageItem(String key, String value); @Override String getBaggageItem(String key); Map<String, String> getBaggageItems(); @Override Span setTag(String key, Number value); @Override io.opentracing.Span setTag(Tag<T> tag, T value); @Override Span setTag(String key, boolean value); @Override Span setTag(String key, String value); Map<String, Object> getTags(); @Override Span log(long timestampMicroseconds, Map<String, ?> fields); @Override Span log(long timestampMicroseconds, String event); @Override Span log(Map<String, ?> fields); @Override Span log(String event); List<LogData> getLogs();  }