Search in sources :

Example 1 with CauchoRequest

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

the class ResinV4Interceptor method beforeMethod.

@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
    CauchoRequest request = (CauchoRequest) allArguments[0];
    ContextCarrier contextCarrier = new ContextCarrier();
    CarrierItem next = contextCarrier.items();
    while (next.hasNext()) {
        next = next.next();
        next.setHeadValue(request.getHeader(next.getHeadKey()));
    }
    AbstractSpan span = ContextManager.createEntrySpan(request.getPageURI(), contextCarrier);
    span.setComponent(ComponentsDefine.RESIN);
    Tags.URL.set(span, appendRequestURL(request));
    SpanLayer.asHttp(span);
}
Also used : CauchoRequest(com.caucho.server.http.CauchoRequest) ContextCarrier(org.apache.skywalking.apm.agent.core.context.ContextCarrier) CarrierItem(org.apache.skywalking.apm.agent.core.context.CarrierItem) AbstractSpan(org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan)

Aggregations

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