Search in sources :

Example 21 with SlowOperContext

use of com.creditease.uav.apm.slowoper.spi.SlowOperContext in project uavstack by uavorg.

the class AbstractSlowOperHandler method doCap.

@Override
public void doCap(InvokeChainContext context, Object[] args) {
    Span span = (Span) args[0];
    DataLogger invokeChainLogger = this.getAppInvokeChainLogger(span.getAppid());
    if (invokeChainLogger == null) {
        return;
    }
    SlowOperSpan slowOperSpan = this.spanFactory.getRemoveSlowOperSpanFromContext(this.getSlowOperSpanKey(span));
    if (slowOperSpan == null) {
        return;
    }
    SlowOperContext slowOperContext = (SlowOperContext) args[1];
    buildSpanContent(slowOperContext, slowOperSpan);
    invokeChainLogger.logData(slowOperSpan.toString());
}
Also used : SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan) SlowOperContext(com.creditease.uav.apm.slowoper.spi.SlowOperContext) DataLogger(com.creditease.monitor.log.DataLogger) Span(com.creditease.uav.apm.invokechain.span.Span) SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan)

Aggregations

SlowOperContext (com.creditease.uav.apm.slowoper.spi.SlowOperContext)21 Span (com.creditease.uav.apm.invokechain.span.Span)20 UnsupportedEncodingException (java.io.UnsupportedEncodingException)4 IOException (java.io.IOException)3 Header (org.apache.http.Header)3 HttpEntity (org.apache.http.HttpEntity)3 BufferedHttpEntity (org.apache.http.entity.BufferedHttpEntity)3 Invocation (com.alibaba.dubbo.rpc.Invocation)2 Result (com.alibaba.dubbo.rpc.Result)2 SlowOperSpan (com.creditease.uav.apm.slowoper.span.SlowOperSpan)2 AMQP (com.rabbitmq.client.AMQP)2 BasicProperties (com.rabbitmq.client.AMQP.BasicProperties)2 HttpMethod (org.apache.commons.httpclient.HttpMethod)2 HttpResponse (org.apache.http.HttpResponse)2 Message (com.alibaba.rocketmq.common.message.Message)1 MessageExt (com.alibaba.rocketmq.common.message.MessageExt)1 DataLogger (com.creditease.monitor.log.DataLogger)1 RewriteIvcRequestWrapper (com.creditease.uav.apm.RewriteIvcRequestWrapper)1 RewriteIvcResponseWrapper (com.creditease.uav.apm.RewriteIvcResponseWrapper)1 BufferedReader (java.io.BufferedReader)1