Search in sources :

Example 36 with Span

use of com.creditease.uav.apm.invokechain.span.Span 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)

Example 37 with Span

use of com.creditease.uav.apm.invokechain.span.Span in project uavstack by uavorg.

the class MqRabbitConsumerSlowOperHandler 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));
    invokeChainLogger.logData(slowOperSpan.toString());
}
Also used : SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan) DataLogger(com.creditease.monitor.log.DataLogger) Span(com.creditease.uav.apm.invokechain.span.Span) SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan)

Aggregations

Span (com.creditease.uav.apm.invokechain.span.Span)37 SlowOperContext (com.creditease.uav.apm.slowoper.spi.SlowOperContext)20 DataLogger (com.creditease.monitor.log.DataLogger)6 SlowOperSpan (com.creditease.uav.apm.slowoper.span.SlowOperSpan)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)4 Invocation (com.alibaba.dubbo.rpc.Invocation)2 Result (com.alibaba.dubbo.rpc.Result)2 AMQP (com.rabbitmq.client.AMQP)2 BasicProperties (com.rabbitmq.client.AMQP.BasicProperties)2 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 HttpMethod (org.apache.commons.httpclient.HttpMethod)2 Header (org.apache.http.Header)2 HttpEntity (org.apache.http.HttpEntity)2 HttpRequest (org.apache.http.HttpRequest)2 HttpResponse (org.apache.http.HttpResponse)2 BufferedHttpEntity (org.apache.http.entity.BufferedHttpEntity)2 Message (com.alibaba.rocketmq.common.message.Message)1