@ -4,11 +4,11 @@ import com.fr.design.record.analyzer.DesignerAnalyzerAdvice;
import com.fr.general.GeneralUtils ;
import com.fr.general.GeneralUtils ;
import com.fr.intelli.measure.Estimator ;
import com.fr.intelli.measure.Estimator ;
import com.fr.intelli.metrics.Compute ;
import com.fr.intelli.metrics.Compute ;
import com.fr.intelli.metrics.MessageRecorderFactory ;
import com.fr.intelli.metrics.SupervisoryConfig ;
import com.fr.intelli.metrics.SupervisoryConfig ;
import com.fr.intelli.record.Measurable ;
import com.fr.intelli.record.Measurable ;
import com.fr.intelli.record.MeasureObject ;
import com.fr.intelli.record.MeasureObject ;
import com.fr.intelli.record.MeasureUnit ;
import com.fr.intelli.record.MeasureUnit ;
import com.fr.intelli.record.MetricRegistry ;
import com.fr.log.FineLoggerFactory ;
import com.fr.log.FineLoggerFactory ;
import com.fr.measure.DBMeterFactory ;
import com.fr.measure.DBMeterFactory ;
import com.fr.stable.ArrayUtils ;
import com.fr.stable.ArrayUtils ;
@ -80,18 +80,16 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice {
List < Object > newArgs = new ArrayList < > ( Arrays . asList ( args ) ) ;
List < Object > newArgs = new ArrayList < > ( Arrays . asList ( args ) ) ;
newArgs . add ( id ) ;
newArgs . add ( id ) ;
recordSQLDetail ( id ) ;
recordSQLDetail ( id ) ;
Object message = null ;
try {
message = measurable . durableEntity ( measureObject , newArgs . toArray ( ) ) ;
} catch ( Throwable throwable ) {
FineLoggerFactory . getLogger ( ) . error ( throwable . getMessage ( ) , throwable ) ;
}
if ( measurable instanceof Estimator ) {
if ( measurable instanceof Estimator ) {
measurable . asyncDurable ( measureObject , newArgs . toArray ( ) ) ;
MessageRecorderFactory . getInstance ( ) . asyncSubmit ( message ) ;
} else {
} else {
Object message = null ;
MessageRecorderFactory . getInstance ( ) . syncSubmit ( message ) ;
try {
message = measurable . durableEntity ( measureObject , newArgs . toArray ( ) ) ;
} catch ( Throwable throwable ) {
FineLoggerFactory . getLogger ( ) . error ( throwable . getMessage ( ) , throwable ) ;
}
if ( message ! = null ) {
MetricRegistry . getMetric ( ) . submit ( message ) ;
}
}
}
}
}
} catch ( Exception ignore ) {
} catch ( Exception ignore ) {