Search in sources :

Example 1 with HttpResponse

use of com.caucho.server.http.HttpResponse in project incubator-skywalking by apache.

the class ResinV3Interceptor method afterMethod.

@Override
public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable {
    HttpResponse response = (HttpResponse) allArguments[1];
    AbstractSpan span = ContextManager.activeSpan();
    if (response.getStatusCode() >= 400) {
        Tags.STATUS_CODE.set(span, Integer.toString(response.getStatusCode()));
        span.errorOccurred();
    }
    ContextManager.stopSpan();
    return ret;
}
Also used : HttpResponse(com.caucho.server.http.HttpResponse) AbstractSpan(org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan)

Aggregations

HttpResponse (com.caucho.server.http.HttpResponse)1 AbstractSpan (org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan)1