Search in sources :

Example 1 with HttpStatusCodeRecorder

use of com.navercorp.pinpoint.bootstrap.plugin.http.HttpStatusCodeRecorder in project pinpoint by naver.

the class ServletResponseListenerBuilder method build.

public ServletResponseListener<RESP> build() {
    HttpStatusCodeRecorder httpStatusCodeRecorder;
    if (httpStatusCodeErrors == null) {
        HttpStatusCodeErrors httpStatusCodeErrors = new HttpStatusCodeErrors(Collections.<String>emptyList());
        httpStatusCodeRecorder = new HttpStatusCodeRecorder(httpStatusCodeErrors);
    } else {
        httpStatusCodeRecorder = new HttpStatusCodeRecorder(httpStatusCodeErrors);
    }
    return new ServletResponseListener<>(traceContext, newServerResponseHeaderRecorder(), httpStatusCodeRecorder);
}
Also used : HttpStatusCodeErrors(com.navercorp.pinpoint.bootstrap.config.HttpStatusCodeErrors) HttpStatusCodeRecorder(com.navercorp.pinpoint.bootstrap.plugin.http.HttpStatusCodeRecorder)

Example 2 with HttpStatusCodeRecorder

use of com.navercorp.pinpoint.bootstrap.plugin.http.HttpStatusCodeRecorder in project pinpoint by naver.

the class ServletRequestListenerBuilder method build.

public ServletRequestListener<REQ> build() {
    RequestAdaptor<REQ> requestAdaptor = RemoteAddressResolverFactory.wrapRealIpSupport(this.requestAdaptor, realIpHeader, realIpEmptyValue);
    RequestTraceReader<REQ> requestTraceReader = new RequestTraceReader<>(traceContext, requestAdaptor, true);
    ProxyRequestRecorder<REQ> proxyRequestRecorder;
    if (requestRecorderFactory == null) {
        proxyRequestRecorder = new DisableRequestRecorder<>();
    } else {
        proxyRequestRecorder = requestRecorderFactory.getProxyRequestRecorder(requestAdaptor);
    }
    Filter<String> excludeUrlFilter = newExcludeUrlFilter(this.excludeUrlFilter);
    final ServerRequestRecorder<REQ> serverRequestRecorder = newServerRequestRecorder(requestAdaptor);
    ParameterRecorder<REQ> parameterRecorder = newParameterRecorder();
    // not general api : http??
    HttpStatusCodeRecorder httpStatusCodeRecorder;
    if (httpStatusCodeErrors == null) {
        HttpStatusCodeErrors httpStatusCodeErrors = new HttpStatusCodeErrors(Collections.<String>emptyList());
        httpStatusCodeRecorder = new HttpStatusCodeRecorder(httpStatusCodeErrors);
    } else {
        httpStatusCodeRecorder = new HttpStatusCodeRecorder(httpStatusCodeErrors);
    }
    return new ServletRequestListener<>(serviceType, traceContext, requestAdaptor, requestTraceReader, excludeUrlFilter, parameterRecorder, proxyRequestRecorder, serverRequestRecorder, httpStatusCodeRecorder, uriStatRecorder, recordStatusCode);
}
Also used : HttpStatusCodeErrors(com.navercorp.pinpoint.bootstrap.config.HttpStatusCodeErrors) HttpStatusCodeRecorder(com.navercorp.pinpoint.bootstrap.plugin.http.HttpStatusCodeRecorder)

Aggregations

HttpStatusCodeErrors (com.navercorp.pinpoint.bootstrap.config.HttpStatusCodeErrors)2 HttpStatusCodeRecorder (com.navercorp.pinpoint.bootstrap.plugin.http.HttpStatusCodeRecorder)2