Search in sources :

Example 1 with ServerRequestRecorder

use of com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestRecorder in project pinpoint by naver.

the class ServerRequestRecorderFactoryTest method record.

@Test
public void record() throws Exception {
    RequestAdaptor<ServerRequestWrapper> requestAdaptor = new ServerRequestWrapperAdaptor();
    final ServerRequestRecorder<ServerRequestWrapper> recorder = new ServerRequestRecorder<>(requestAdaptor);
    // SpanRecorder
    SpanRecorder spanRecorder = mock(SpanRecorder.class);
    recorder.record(spanRecorder, new MockServerRequestWrapper());
    verify(spanRecorder).recordRpcName(RPC_NAME);
    verify(spanRecorder).recordEndPoint(END_POINT);
    verify(spanRecorder).recordRemoteAddress(REMOTE_ADDRESS);
    verify(spanRecorder).recordAcceptorHost(GET_HEADER);
}
Also used : SpanRecorder(com.navercorp.pinpoint.bootstrap.context.SpanRecorder) ServerRequestRecorder(com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestRecorder) ServerRequestWrapper(com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestWrapper) ServerRequestWrapperAdaptor(com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestWrapperAdaptor) Test(org.junit.Test)

Aggregations

SpanRecorder (com.navercorp.pinpoint.bootstrap.context.SpanRecorder)1 ServerRequestRecorder (com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestRecorder)1 ServerRequestWrapper (com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestWrapper)1 ServerRequestWrapperAdaptor (com.navercorp.pinpoint.bootstrap.plugin.request.ServerRequestWrapperAdaptor)1 Test (org.junit.Test)1