Browse Source

Pull request #8527: POM-5887 execute埋点逻辑修改

Merge in DESIGN/design from ~BRYANT/design:release/11.0 to release/11.0

* commit '6e0d9710fbe9f808af7773eb1b9fac10048160df':
  Update designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java
bugfix/11.0
Bryant 3 years ago
parent
commit
af44a0d4a3
  1. 20
      designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java

20
designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java

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

Loading…
Cancel
Save