Search in sources :

Example 1 with SlowOperSpan

use of com.creditease.uav.apm.slowoper.span.SlowOperSpan in project uavstack by uavorg.

the class MQSlowOperHandler 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;
    }
    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)

Example 2 with SlowOperSpan

use of com.creditease.uav.apm.slowoper.span.SlowOperSpan in project uavstack by uavorg.

the class AbstractSlowOperHandler method preCap.

@Override
public void preCap(InvokeChainContext context, Object[] args) {
    Span span = (Span) args[0];
    SlowOperSpan slowOperSpan = this.spanFactory.buildSlowOperSpan(span);
    SlowOperContext slowOperContext = (SlowOperContext) args[1];
    buildSpanContent(slowOperContext, slowOperSpan);
    this.spanFactory.setSlowOperSpanToContext(this.getSlowOperSpanKey(span), slowOperSpan);
}
Also used : SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan) SlowOperContext(com.creditease.uav.apm.slowoper.spi.SlowOperContext) Span(com.creditease.uav.apm.invokechain.span.Span) SlowOperSpan(com.creditease.uav.apm.slowoper.span.SlowOperSpan)

Example 3 with SlowOperSpan

use of com.creditease.uav.apm.slowoper.span.SlowOperSpan 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 4 with SlowOperSpan

use of com.creditease.uav.apm.slowoper.span.SlowOperSpan 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)4 SlowOperSpan (com.creditease.uav.apm.slowoper.span.SlowOperSpan)4 DataLogger (com.creditease.monitor.log.DataLogger)3 SlowOperContext (com.creditease.uav.apm.slowoper.spi.SlowOperContext)2