Prefers the word event when adding to a Span's timeline
Span.logs are really timestamped events. This clarifies the naming and documentation around that.
This commit is contained in:
@@ -106,8 +106,8 @@ public class ZipkinMessageListener {
|
||||
for (Log ta : span.logs()) {
|
||||
Annotation zipkinAnnotation = new Annotation.Builder()
|
||||
.endpoint(endpoint)
|
||||
.timestamp(ta.getTime() * 1000) // Zipkin is in microseconds
|
||||
.value(ta.getMsg())
|
||||
.timestamp(ta.getTimestamp() * 1000) // Zipkin is in microseconds
|
||||
.value(ta.getEvent())
|
||||
.build();
|
||||
zipkinSpan.addAnnotation(zipkinAnnotation);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ZipkinMessageListenerTests {
|
||||
@Test
|
||||
public void convertsTimestampAndDurationToMicroseconds() {
|
||||
long start = System.currentTimeMillis();
|
||||
this.span.log("hystrix/retry"); // System.currentTimeMillis
|
||||
this.span.logEvent("hystrix/retry"); // System.currentTimeMillis
|
||||
|
||||
zipkin.Span result = ZipkinMessageListener.convert(this.span, this.host);
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ZipkinMessageListenerTests {
|
||||
/** Sleuth host corresponds to annotation/binaryAnnotation.host in zipkin. */
|
||||
@Test
|
||||
public void annotationsIncludeHost() {
|
||||
this.span.log("hystrix/retry");
|
||||
this.span.logEvent("hystrix/retry");
|
||||
this.span.tag("spring-boot/version", "1.3.1.RELEASE");
|
||||
|
||||
zipkin.Span result = ZipkinMessageListener.convert(this.span, this.host);
|
||||
|
||||
Reference in New Issue
Block a user