test_class.declarator: mockTracer = new MockTracer(new ThreadLocalScopeManager(), MockTracer.Propagator.TEXT_MAP)
test_class.modifier: protected
test_class.original_string: protected MockTracer mockTracer = new MockTracer(new ThreadLocalScopeManager(), MockTracer.Propagator.TEXT_MAP);
test_class.type: MockTracer
test_class.var_name: mockTracer
test_class.file: opentracing-vertx-web/src/test/java/io/opentracing/contrib/vertx/ext/web/TracingHandlerTest.java
test_class.identifier: TracingHandlerTest
test_class.superclass: extends WebTestBase
test_case.body: @Test
      public void testLocalSpan() throws Exception {
          {
              router.route("/localSpan").handler(routingContext -> {
                  SpanContext serverSpanContext = TracingHandler.serverSpanContext(routingContext);
                  io.opentracing.Tracer.SpanBuilder spanBuilder = mockTracer.buildSpan("localSpan");
  
                  spanBuilder.asChildOf(serverSpanContext)
                          .start()
                          .finish();
  
                  routingContext.response()
                          .setStatusCode(202)
                          .end();
              });
  
              request("/localSpan", HttpMethod.GET, 202);
              Awaitility.await().until(reportedSpansSize(), IsEqual.equalTo(2));
          }
          List<MockSpan> mockSpans = mockTracer.finishedSpans();
          Assert.assertEquals(2, mockSpans.size());
  
          Assert.assertEquals(mockSpans.get(0).parentId(), mockSpans.get(1).context().spanId());
          Assert.assertEquals(mockSpans.get(0).context().traceId(), mockSpans.get(1).context().traceId());
      }
test_case.class_method_signature: TracingHandlerTest.testLocalSpan()
test_case.full_signature: @Test public void testLocalSpan()
test_case.identifier: testLocalSpan
test_case.invocations: handler route serverSpanContext buildSpan finish start asChildOf end setStatusCode response request until await reportedSpansSize equalTo finishedSpans assertEquals size assertEquals parentId get spanId context get assertEquals traceId context get traceId context get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLocalSpan()
focal_class.declarator: log = LoggerFactory.getLogger(TracingHandler.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(TracingHandler.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: CURRENT_SPAN = TracingHandler.class.getName() + ".severSpan"
focal_class.modifier: public static final
focal_class.original_string: public static final String CURRENT_SPAN = TracingHandler.class.getName() + ".severSpan";
focal_class.type: String
focal_class.var_name: CURRENT_SPAN
focal_class.declarator: tracer
focal_class.modifier: private final
focal_class.original_string: private final Tracer tracer;
focal_class.type: Tracer
focal_class.var_name: tracer
focal_class.declarator: decorators
focal_class.modifier: private final
focal_class.original_string: private final List<WebSpanDecorator> decorators;
focal_class.type: List<WebSpanDecorator>
focal_class.var_name: decorators
focal_class.file: opentracing-vertx-web/src/main/java/io/opentracing/contrib/vertx/ext/web/TracingHandler.java
focal_class.identifier: TracingHandler
focal_class.interfaces: implements Handler<RoutingContext>
focal_class.class_method_signature: TracingHandler.TracingHandler(Tracer tracer)
focal_class.full_signature: public  TracingHandler(Tracer tracer)
focal_class.identifier: TracingHandler
focal_class.modifiers: public
focal_class.parameters: (Tracer tracer)
focal_class.signature:  TracingHandler(Tracer tracer)
focal_class.class_method_signature: TracingHandler.TracingHandler(Tracer tracer, List<WebSpanDecorator> decorators)
focal_class.full_signature: public  TracingHandler(Tracer tracer, List<WebSpanDecorator> decorators)
focal_class.identifier: TracingHandler
focal_class.modifiers: public
focal_class.parameters: (Tracer tracer, List<WebSpanDecorator> decorators)
focal_class.signature:  TracingHandler(Tracer tracer, List<WebSpanDecorator> decorators)
focal_class.class_method_signature: TracingHandler.handle(RoutingContext routingContext)
focal_class.full_signature: @Override public void handle(RoutingContext routingContext)
focal_class.identifier: handle
focal_class.modifiers: @Override public
focal_class.parameters: (RoutingContext routingContext)
focal_class.return: void
focal_class.signature: void handle(RoutingContext routingContext)
focal_class.class_method_signature: TracingHandler.handlerNormal(RoutingContext routingContext)
focal_class.full_signature: protected void handlerNormal(RoutingContext routingContext)
focal_class.identifier: handlerNormal
focal_class.modifiers: protected
focal_class.parameters: (RoutingContext routingContext)
focal_class.return: void
focal_class.signature: void handlerNormal(RoutingContext routingContext)
focal_class.class_method_signature: TracingHandler.handlerFailure(RoutingContext routingContext)
focal_class.full_signature: protected void handlerFailure(RoutingContext routingContext)
focal_class.identifier: handlerFailure
focal_class.modifiers: protected
focal_class.parameters: (RoutingContext routingContext)
focal_class.return: void
focal_class.signature: void handlerFailure(RoutingContext routingContext)
focal_class.class_method_signature: TracingHandler.finishEndHandler(RoutingContext routingContext, Span span)
focal_class.full_signature: private Handler<Void> finishEndHandler(RoutingContext routingContext, Span span)
focal_class.identifier: finishEndHandler
focal_class.modifiers: private
focal_class.parameters: (RoutingContext routingContext, Span span)
focal_class.return: Handler<Void>
focal_class.signature: Handler<Void> finishEndHandler(RoutingContext routingContext, Span span)
focal_class.class_method_signature: TracingHandler.serverSpanContext(RoutingContext routingContext)
focal_class.full_signature: public static SpanContext serverSpanContext(RoutingContext routingContext)
focal_class.identifier: serverSpanContext
focal_class.modifiers: public static
focal_class.parameters: (RoutingContext routingContext)
focal_class.return: SpanContext
focal_class.signature: SpanContext serverSpanContext(RoutingContext routingContext)
focal_method.body: public static SpanContext serverSpanContext(RoutingContext routingContext) {
          SpanContext serverContext = null;
  
          Object object = routingContext.get(CURRENT_SPAN);
          if (object instanceof Span) {
              Span span = (Span) object;
              serverContext = span.context();
          } else {
              log.error("Sever SpanContext is null or not an instance of SpanContext");
          }
  
          return serverContext;
      }
focal_method.class_method_signature: TracingHandler.serverSpanContext(RoutingContext routingContext)
focal_method.full_signature: public static SpanContext serverSpanContext(RoutingContext routingContext)
focal_method.identifier: serverSpanContext
focal_method.invocations: get context error
focal_method.modifiers: public static
focal_method.parameters: (RoutingContext routingContext)
focal_method.return: SpanContext
focal_method.signature: SpanContext serverSpanContext(RoutingContext routingContext)