use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.
the class CassandraSpanConsumerTest method serviceSpanKeys_emptyWhenNoEndpoints.
@Test
public void serviceSpanKeys_emptyWhenNoEndpoints() {
Span span = spanWithoutAnnotationsOrTags.toBuilder().localEndpoint(null).build();
assertThat(consumer.accept(singletonList(span))).isInstanceOf(ResultSetFutureCall.class);
}
use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.
the class CassandraSpanConsumerTest method doesntSetTraceIdHigh_128.
@Test
public void doesntSetTraceIdHigh_128() {
Span span = spanWithoutAnnotationsOrTags.toBuilder().traceId("77fcac3d4c5be8d2a037812820c65f28").build();
AggregateCall<?, Void> call = (AggregateCall<?, Void>) consumer.accept(singletonList(span));
assertThat(call.delegate()).filteredOn(c -> c instanceof InsertSpan).extracting("input.trace_id_high", "input.trace_id").containsExactly(tuple(null, span.traceId()));
}
use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.
the class CassandraSpanConsumerTest method serviceRemoteServiceKeys_addsRemoteServiceName.
@Test
public void serviceRemoteServiceKeys_addsRemoteServiceName() {
Span span = spanWithoutAnnotationsOrTags.toBuilder().remoteEndpoint(BACKEND).build();
AggregateCall<?, Void> call = (AggregateCall<?, Void>) consumer.accept(singletonList(span));
assertThat(call.delegate()).filteredOn(c -> c instanceof InsertEntry).extracting("input").containsExactly(entry(FRONTEND.serviceName(), span.name()), entry(FRONTEND.serviceName(), BACKEND.serviceName()));
}
use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.
the class CassandraSpanConsumerTest method traceByServiceSpan_skipsOnNoTimestamp.
@Test
public void traceByServiceSpan_skipsOnNoTimestamp() {
Span span = spanWithoutAnnotationsOrTags.toBuilder().timestamp(null).build();
AggregateCall<?, Void> call = (AggregateCall<?, Void>) consumer.accept(singletonList(span));
assertThat(call.delegate()).filteredOn(c -> c instanceof InsertTraceByServiceSpan).extracting("input.service", "input.span").isEmpty();
}
use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.
the class CassandraSpanConsumerTest method doesntIndexWhenOnlyIncludesTimestamp.
@Test
public void doesntIndexWhenOnlyIncludesTimestamp() {
Span span = Span.newBuilder().traceId("a").id("1").timestamp(TODAY * 1000L).build();
assertThat(consumer.accept(singletonList(span))).isInstanceOf(ResultSetFutureCall.class);
}
Aggregations