Search in sources :

Example 1 with Span

use of io.opentelemetry.proto.trace.v1.Span in project brave by openzipkin.

the class ITSpanCustomizingAsyncHandlerInterceptor method addsControllerTags.

@Test
public void addsControllerTags() throws Exception {
    get("/foo");
    Span span = takeSpan();
    assertThat(span.tags()).containsEntry("mvc.controller.class", "TestController").containsEntry("mvc.controller.method", "foo");
}
Also used : Span(zipkin2.Span) Test(org.junit.Test)

Example 2 with Span

use of io.opentelemetry.proto.trace.v1.Span in project brave by openzipkin.

the class ITTracingAsyncHandlerInterceptor method tagsHandler.

@Test
public void tagsHandler() throws Exception {
    get("/foo");
    Span span = takeSpan();
    assertThat(span.tags()).containsEntry("mvc.controller.class", "TestController").containsEntry("mvc.controller.method", "foo");
}
Also used : Span(zipkin2.Span) Test(org.junit.Test)

Example 3 with Span

use of io.opentelemetry.proto.trace.v1.Span in project brave by openzipkin.

the class ITTracingHandlerInterceptor method tagsHandler.

@Test
public void tagsHandler() throws Exception {
    get("/foo");
    Span span = takeSpan();
    assertThat(span.tags()).containsEntry("mvc.controller.class", "TestController").containsEntry("mvc.controller.method", "foo");
}
Also used : Span(zipkin2.Span) Test(org.junit.Test)

Example 4 with Span

use of io.opentelemetry.proto.trace.v1.Span in project brave by openzipkin.

the class ITTracingFilter_Consumer method onTransportException_addsErrorTag.

@Test
public void onTransportException_addsErrorTag() throws Exception {
    server.stop();
    try {
        client.get().sayHello("jorge");
        failBecauseExceptionWasNotThrown(RpcException.class);
    } catch (RpcException e) {
    }
    Span span = spans.take();
    assertThat(span.tags().get("error")).contains("RemotingException");
}
Also used : RpcException(com.alibaba.dubbo.rpc.RpcException) Span(zipkin2.Span) Test(org.junit.Test)

Example 5 with Span

use of io.opentelemetry.proto.trace.v1.Span in project brave by openzipkin.

the class ITTracingFilter_Consumer method defaultSpanNameIsMethodName.

@Test
public void defaultSpanNameIsMethodName() throws Exception {
    client.get().sayHello("jorge");
    Span span = spans.take();
    assertThat(span.name()).isEqualTo("greeterservice/sayhello");
}
Also used : Span(zipkin2.Span) Test(org.junit.Test)

Aggregations

Span (zipkin2.Span)326 Test (org.junit.Test)236 Test (org.junit.jupiter.api.Test)78 Endpoint (zipkin2.Endpoint)43 ArrayList (java.util.ArrayList)41 TestObjects.newClientSpan (zipkin2.TestObjects.newClientSpan)41 Span (io.opentelemetry.proto.trace.v1.Span)35 List (java.util.List)20 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)20 V1Span (zipkin2.v1.V1Span)17 Span (com.google.devtools.cloudtrace.v2.Span)16 Map (java.util.Map)14 AggregateCall (zipkin2.internal.AggregateCall)13 ResourceSpans (io.opentelemetry.proto.trace.v1.ResourceSpans)11 Arrays.asList (java.util.Arrays.asList)11 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)11 Annotation (wavefront.report.Annotation)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