Fix formatting

This commit is contained in:
Tyler Benson 2017-07-17 12:06:13 -07:00
parent 78236331eb
commit b811a33717
3 changed files with 30 additions and 6 deletions

View File

@ -10,14 +10,22 @@ public class ExampleWithLoggingWriter {
DDTracer tracer = new DDTracer(new LoggingWriter(), new AllSampler());
Span parent =
tracer.buildSpan("hello-world").withServiceName("service-name").withSpanType("web").startManual();
tracer
.buildSpan("hello-world")
.withServiceName("service-name")
.withSpanType("web")
.startManual();
parent.setBaggageItem("a-baggage", "value");
Thread.sleep(100);
Span child =
tracer.buildSpan("hello-world").asChildOf(parent).withResourceName("resource-name").startManual();
tracer
.buildSpan("hello-world")
.asChildOf(parent)
.withResourceName("resource-name")
.startManual();
Thread.sleep(100);

View File

@ -141,7 +141,11 @@ public class DDSpanBuilderTest {
final String expectedName = "fakeName";
DDSpan span =
tracer.buildSpan(expectedName).withServiceName("foo").asChildOf(mockedContext).startManual();
tracer
.buildSpan(expectedName)
.withServiceName("foo")
.asChildOf(mockedContext)
.startManual();
DDSpanContext actualContext = span.context();
@ -219,7 +223,11 @@ public class DDSpanBuilderTest {
for (int i = 1; i <= 10; i++) {
spans.add(
tracer.buildSpan("fake_" + i).withServiceName("foo").asChildOf(spans.get(i - 1)).startManual());
tracer
.buildSpan("fake_" + i)
.withServiceName("foo")
.asChildOf(spans.get(i - 1))
.startManual());
}
spans.get(1).finish(tickEnd);

View File

@ -22,14 +22,22 @@ public class ExampleWithDDAgentWriter {
DDTracer tracer = new DDTracer(writer, sampler);
Span parent =
tracer.buildSpan("hello-world").withServiceName("service-name").withSpanType("web").startManual();
tracer
.buildSpan("hello-world")
.withServiceName("service-name")
.withSpanType("web")
.startManual();
Thread.sleep(100);
parent.setBaggageItem("a-baggage", "value");
Span child =
tracer.buildSpan("hello-world").asChildOf(parent).withResourceName("resource-name").startManual();
tracer
.buildSpan("hello-world")
.asChildOf(parent)
.withResourceName("resource-name")
.startManual();
Thread.sleep(100);