use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.
the class ApplicationDayMetricTransformNode method process.
@Override
public void process(ApplicationMetric applicationMetric, Next<ApplicationMetric> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToDay(applicationMetric.getTimeBucket());
ApplicationMetric newApplicationMetric = ApplicationMetricCopy.copy(applicationMetric);
newApplicationMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + applicationMetric.getMetricId());
newApplicationMetric.setTimeBucket(timeBucket);
next.execute(newApplicationMetric);
}
use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.
the class ApplicationMetricGraph method create.
public void create() {
RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
Graph<ApplicationReferenceMetric> graph = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.APPLICATION_METRIC_GRAPH_ID, ApplicationReferenceMetric.class);
Node<ApplicationMetric, ApplicationMetric> remoteNode = graph.addNode(new ApplicationMinuteMetricAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ApplicationMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.APPLICATION_METRIC_GRAPH_ID).create(workerCreateListener));
remoteNode.addNext(new ApplicationMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new ApplicationHourMetricTransformNode()).addNext(new ApplicationHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new ApplicationDayMetricTransformNode()).addNext(new ApplicationDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new ApplicationMonthMetricTransformNode()).addNext(new ApplicationMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
link(graph);
}
use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.
the class ApplicationMonthMetricTransformNode method process.
@Override
public void process(ApplicationMetric applicationMetric, Next<ApplicationMetric> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToMonth(applicationMetric.getTimeBucket());
ApplicationMetric newApplicationMetric = ApplicationMetricCopy.copy(applicationMetric);
newApplicationMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + applicationMetric.getMetricId());
newApplicationMetric.setTimeBucket(timeBucket);
next.execute(newApplicationMetric);
}
use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.
the class AbstractApplicationMetricH2PersistenceDAO method h2DataToStreamData.
@Override
protected final ApplicationMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
ApplicationMetric applicationMetric = new ApplicationMetric();
applicationMetric.setId(resultSet.getString(ApplicationMetricTable.COLUMN_ID));
applicationMetric.setMetricId(resultSet.getString(ApplicationMetricTable.COLUMN_METRIC_ID));
applicationMetric.setApplicationId(resultSet.getInt(ApplicationMetricTable.COLUMN_APPLICATION_ID));
applicationMetric.setSourceValue(resultSet.getInt(ApplicationMetricTable.COLUMN_SOURCE_VALUE));
applicationMetric.setTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS));
applicationMetric.setTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
applicationMetric.setTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
applicationMetric.setTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setTransactionAverageDuration(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_AVERAGE_DURATION));
applicationMetric.setBusinessTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
applicationMetric.setBusinessTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
applicationMetric.setBusinessTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
applicationMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setBusinessTransactionAverageDuration(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_AVERAGE_DURATION));
applicationMetric.setMqTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
applicationMetric.setMqTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
applicationMetric.setMqTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
applicationMetric.setMqTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setMqTransactionAverageDuration(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_AVERAGE_DURATION));
applicationMetric.setSatisfiedCount(resultSet.getLong(ApplicationMetricTable.COLUMN_SATISFIED_COUNT));
applicationMetric.setToleratingCount(resultSet.getLong(ApplicationMetricTable.COLUMN_TOLERATING_COUNT));
applicationMetric.setFrustratedCount(resultSet.getLong(ApplicationMetricTable.COLUMN_FRUSTRATED_COUNT));
applicationMetric.setTimeBucket(resultSet.getLong(ApplicationMetricTable.COLUMN_TIME_BUCKET));
return applicationMetric;
}
Aggregations