Search in sources :

Example 36 with Span

use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.

the class ITSearchEnabledFalse method getRemoteServiceNames_isEmpty.

@Test
protected void getRemoteServiceNames_isEmpty(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span span = spanBuilder(testSuffix).build();
    accept(span);
    assertThat(names().getRemoteServiceNames(span.localServiceName()).execute()).isEmpty();
}
Also used : TestObjects.newClientSpan(zipkin2.TestObjects.newClientSpan) Span(zipkin2.Span) Test(org.junit.jupiter.api.Test)

Example 37 with Span

use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.

the class ITServiceAndSpanNames method getSpanNames_serviceNameGoesLowercase.

@Test
protected void getSpanNames_serviceNameGoesLowercase(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span span = spanBuilder(testSuffix).build();
    accept(span);
    String uppercase = span.localServiceName().toUpperCase(Locale.ROOT);
    assertThat(names().getSpanNames(uppercase).execute()).containsExactly(span.name());
}
Also used : TestObjects.newClientSpan(zipkin2.TestObjects.newClientSpan) Span(zipkin2.Span) Test(org.junit.jupiter.api.Test)

Example 38 with Span

use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.

the class ITServiceAndSpanNames method getSpanNames.

@Test
protected void getSpanNames(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span span = spanBuilder(testSuffix).build();
    assertThat(names().getSpanNames(span.localServiceName()).execute()).isEmpty();
    accept(span);
    assertThat(names().getSpanNames(span.localServiceName() + 1).execute()).isEmpty();
    assertThat(names().getSpanNames(span.localServiceName()).execute()).contains(span.name());
}
Also used : TestObjects.newClientSpan(zipkin2.TestObjects.newClientSpan) Span(zipkin2.Span) Test(org.junit.jupiter.api.Test)

Example 39 with Span

use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.

the class ITServiceAndSpanNames method getRemoteServiceNames.

@Test
protected void getRemoteServiceNames(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span clientSpan = newClientSpan(testSuffix);
    assertThat(names().getRemoteServiceNames(clientSpan.localServiceName()).execute()).isEmpty();
    accept(clientSpan);
    assertThat(names().getRemoteServiceNames(clientSpan.localServiceName() + 1).execute()).isEmpty();
    assertThat(names().getRemoteServiceNames(clientSpan.localServiceName()).execute()).contains(clientSpan.remoteServiceName());
}
Also used : TestObjects.newClientSpan(zipkin2.TestObjects.newClientSpan) Span(zipkin2.Span) Test(org.junit.jupiter.api.Test)

Example 40 with Span

use of com.google.devtools.cloudtrace.v2.Span in project zipkin by openzipkin.

the class ITServiceAndSpanNames method getLocalServiceNames_includesLocalServiceName.

@Test
protected void getLocalServiceNames_includesLocalServiceName(TestInfo testInfo) throws Exception {
    String testSuffix = testSuffix(testInfo);
    Span clientSpan = newClientSpan(testSuffix);
    assertThat(names().getServiceNames().execute()).isEmpty();
    accept(clientSpan);
    assertThat(names().getServiceNames().execute()).containsOnly(clientSpan.localServiceName());
}
Also used : TestObjects.newClientSpan(zipkin2.TestObjects.newClientSpan) Span(zipkin2.Span) Test(org.junit.jupiter.api.Test)

Aggregations

Span (zipkin2.Span)340 Test (org.junit.Test)260 Test (org.junit.jupiter.api.Test)84 Span (io.opentelemetry.proto.trace.v1.Span)54 ArrayList (java.util.ArrayList)45 Endpoint (zipkin2.Endpoint)43 TestObjects.newClientSpan (zipkin2.TestObjects.newClientSpan)41 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)39 List (java.util.List)25 Annotation (wavefront.report.Annotation)22 V1Span (zipkin2.v1.V1Span)17 Span (com.google.devtools.cloudtrace.v2.Span)16 Map (java.util.Map)15 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)14 AggregateCall (zipkin2.internal.AggregateCall)13 ByteString (com.google.protobuf.ByteString)11 Arrays.asList (java.util.Arrays.asList)11 Trace (com.google.devtools.cloudtrace.v1.Trace)10 TraceSpan (com.google.devtools.cloudtrace.v1.TraceSpan)10 AttributeValue (com.google.devtools.cloudtrace.v2.AttributeValue)10