[#158] Removing span name

fixes #158
This commit is contained in:
Marcin Grzejszczak
2016-02-16 08:28:22 +01:00
parent a3f14a6d55
commit 8333c31c99
46 changed files with 124 additions and 436 deletions

View File

@@ -23,12 +23,11 @@ import java.util.Collections;
import org.junit.Test;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.SpanName;
import static org.assertj.core.api.Assertions.assertThat;
public class ServerPropertiesHostLocatorTests {
Span span = new Span(1, 3, new SpanName("http", "name"), 1L, Collections.<Long>emptyList(), 2L, true, true,
Span span = new Span(1, 3, "http:name", 1L, Collections.<Long>emptyList(), 2L, true, true,
"process");
@Test

View File

@@ -35,7 +35,6 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.cloud.sleuth.Sampler;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.SpanName;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.cloud.sleuth.autoconfig.TraceAutoConfiguration;
import org.springframework.cloud.sleuth.event.ClientReceivedEvent;
@@ -76,16 +75,16 @@ public class StreamSpanListenerTests {
@Test
public void acquireAndRelease() {
Span context = this.tracer.startTrace(new SpanName("http", "foo"));
Span context = this.tracer.startTrace("http:foo");
this.tracer.close(context);
assertEquals(1, this.test.spans.size());
}
@Test
public void rpcAnnotations() {
Span parent = Span.builder().traceId(1L).name(new SpanName("http", "parent")).remote(true)
Span parent = Span.builder().traceId(1L).name("http:parent").remote(true)
.build();
Span context = this.tracer.joinTrace(new SpanName("http", "child"), parent);
Span context = this.tracer.joinTrace("http:child", parent);
this.application.publishEvent(new ClientSentEvent(this, context));
this.application
.publishEvent(new ServerReceivedEvent(this, parent, context));
@@ -108,7 +107,7 @@ public class StreamSpanListenerTests {
@Test
public void shouldIncreaseNumberOfAcceptedSpans() {
Span context = this.tracer.startTrace(new SpanName("http", "foo"));
Span context = this.tracer.startTrace("http:foo");
this.tracer.close(context);
this.listener.poll();