Search in sources :

Example 1 with ApplicationMetric

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.

the class ApplicationMinuteMetricAggregationWorker method transform.

@Override
protected ApplicationMetric transform(ApplicationReferenceMetric applicationReferenceMetric) {
    Integer applicationId = applicationReferenceMetric.getBehindApplicationId();
    Long timeBucket = applicationReferenceMetric.getTimeBucket();
    String metricId = String.valueOf(applicationId) + Const.ID_SPLIT + applicationReferenceMetric.getSourceValue();
    String id = String.valueOf(timeBucket) + Const.ID_SPLIT + metricId;
    ApplicationMetric applicationMetric = new ApplicationMetric();
    applicationMetric.setId(id);
    applicationMetric.setMetricId(metricId);
    applicationMetric.setApplicationId(applicationId);
    applicationMetric.setSourceValue(applicationReferenceMetric.getSourceValue());
    applicationMetric.setTransactionCalls(applicationReferenceMetric.getTransactionCalls());
    applicationMetric.setTransactionDurationSum(applicationReferenceMetric.getTransactionDurationSum());
    applicationMetric.setTransactionErrorCalls(applicationReferenceMetric.getTransactionErrorCalls());
    applicationMetric.setTransactionErrorDurationSum(applicationReferenceMetric.getTransactionErrorDurationSum());
    applicationMetric.setBusinessTransactionCalls(applicationReferenceMetric.getBusinessTransactionCalls());
    applicationMetric.setBusinessTransactionDurationSum(applicationReferenceMetric.getBusinessTransactionDurationSum());
    applicationMetric.setBusinessTransactionErrorCalls(applicationReferenceMetric.getBusinessTransactionErrorCalls());
    applicationMetric.setBusinessTransactionErrorDurationSum(applicationReferenceMetric.getBusinessTransactionErrorDurationSum());
    applicationMetric.setMqTransactionCalls(applicationReferenceMetric.getMqTransactionCalls());
    applicationMetric.setMqTransactionDurationSum(applicationReferenceMetric.getMqTransactionDurationSum());
    applicationMetric.setMqTransactionErrorCalls(applicationReferenceMetric.getMqTransactionErrorCalls());
    applicationMetric.setMqTransactionErrorDurationSum(applicationReferenceMetric.getMqTransactionErrorDurationSum());
    applicationMetric.setSatisfiedCount(applicationReferenceMetric.getSatisfiedCount());
    applicationMetric.setToleratingCount(applicationReferenceMetric.getToleratingCount());
    applicationMetric.setFrustratedCount(applicationReferenceMetric.getFrustratedCount());
    applicationMetric.setTimeBucket(timeBucket);
    return applicationMetric;
}
Also used : ApplicationMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)

Example 2 with ApplicationMetric

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.

the class ApplicationMetricCopy method copy.

public static ApplicationMetric copy(ApplicationMetric applicationMetric) {
    ApplicationMetric newApplicationMetric = new ApplicationMetric();
    newApplicationMetric.setId(applicationMetric.getId());
    newApplicationMetric.setMetricId(applicationMetric.getMetricId());
    newApplicationMetric.setSourceValue(applicationMetric.getSourceValue());
    newApplicationMetric.setApplicationId(applicationMetric.getApplicationId());
    newApplicationMetric.setTransactionCalls(applicationMetric.getTransactionCalls());
    newApplicationMetric.setTransactionDurationSum(applicationMetric.getTransactionDurationSum());
    newApplicationMetric.setTransactionErrorCalls(applicationMetric.getTransactionErrorCalls());
    newApplicationMetric.setTransactionErrorDurationSum(applicationMetric.getTransactionErrorDurationSum());
    newApplicationMetric.setBusinessTransactionCalls(applicationMetric.getBusinessTransactionCalls());
    newApplicationMetric.setBusinessTransactionDurationSum(applicationMetric.getBusinessTransactionDurationSum());
    newApplicationMetric.setBusinessTransactionErrorCalls(applicationMetric.getBusinessTransactionErrorCalls());
    newApplicationMetric.setBusinessTransactionErrorDurationSum(applicationMetric.getBusinessTransactionErrorDurationSum());
    newApplicationMetric.setMqTransactionCalls(applicationMetric.getMqTransactionCalls());
    newApplicationMetric.setMqTransactionDurationSum(applicationMetric.getMqTransactionDurationSum());
    newApplicationMetric.setMqTransactionErrorCalls(applicationMetric.getMqTransactionErrorCalls());
    newApplicationMetric.setMqTransactionErrorDurationSum(applicationMetric.getMqTransactionErrorDurationSum());
    newApplicationMetric.setSatisfiedCount(applicationMetric.getSatisfiedCount());
    newApplicationMetric.setToleratingCount(applicationMetric.getToleratingCount());
    newApplicationMetric.setFrustratedCount(applicationMetric.getFrustratedCount());
    newApplicationMetric.setTimeBucket(applicationMetric.getTimeBucket());
    return newApplicationMetric;
}
Also used : ApplicationMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)

Example 3 with ApplicationMetric

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.

the class ApplicationHourMetricTransformNode method process.

@Override
public void process(ApplicationMetric applicationMetric, Next<ApplicationMetric> next) {
    long timeBucket = TimeBucketUtils.INSTANCE.minuteToHour(applicationMetric.getTimeBucket());
    ApplicationMetric newApplicationMetric = ApplicationMetricCopy.copy(applicationMetric);
    newApplicationMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + applicationMetric.getMetricId());
    newApplicationMetric.setTimeBucket(timeBucket);
    next.execute(newApplicationMetric);
}
Also used : ApplicationMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)

Example 4 with ApplicationMetric

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.

the class ApplicationMetricAlarmGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Graph<ApplicationMetric> graph = GraphManager.INSTANCE.createIfAbsent(AlarmGraphIdDefine.APPLICATION_METRIC_ALARM_GRAPH_ID, ApplicationMetric.class);
    graph.addNode(new ApplicationMetricAlarmAssertWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ApplicationMetricAlarmRemoteWorker.Factory(moduleManager, remoteSenderService, AlarmGraphIdDefine.APPLICATION_METRIC_ALARM_GRAPH_ID).create(workerCreateListener)).addNext(new ApplicationMetricAlarmPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    graph.toFinder().findNode(AlarmWorkerIdDefine.APPLICATION_METRIC_ALARM_REMOTE_WORKER_ID, ApplicationAlarm.class).addNext(new ApplicationMetricAlarmToListNodeProcessor()).addNext(new ApplicationMetricAlarmListMinutePersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    graph.toFinder().findNode(AlarmWorkerIdDefine.APPLICATION_METRIC_ALARM_LIST_MINUTE_PERSISTENCE_WORKER_ID, ApplicationAlarmList.class).addNext(new ApplicationMetricAlarmListHourTransformNode()).addNext(new ApplicationMetricAlarmListHourPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    graph.toFinder().findNode(AlarmWorkerIdDefine.APPLICATION_METRIC_ALARM_LIST_MINUTE_PERSISTENCE_WORKER_ID, ApplicationAlarmList.class).addNext(new ApplicationMetricAlarmListDayTransformNode()).addNext(new ApplicationMetricAlarmListDayPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    graph.toFinder().findNode(AlarmWorkerIdDefine.APPLICATION_METRIC_ALARM_LIST_MINUTE_PERSISTENCE_WORKER_ID, ApplicationAlarmList.class).addNext(new ApplicationMetricAlarmListMonthTransformNode()).addNext(new ApplicationMetricAlarmListMonthPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    link(graph);
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) ApplicationMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)

Example 5 with ApplicationMetric

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric in project incubator-skywalking by apache.

the class AbstractApplicationMetricEsPersistenceDAO method esDataToStreamData.

@Override
protected final ApplicationMetric esDataToStreamData(Map<String, Object> source) {
    ApplicationMetric applicationMetric = new ApplicationMetric();
    applicationMetric.setMetricId((String) source.get(ApplicationMetricTable.COLUMN_METRIC_ID));
    applicationMetric.setApplicationId(((Number) source.get(ApplicationMetricTable.COLUMN_APPLICATION_ID)).intValue());
    applicationMetric.setSourceValue(((Number) source.get(ApplicationMetricTable.COLUMN_SOURCE_VALUE)).intValue());
    applicationMetric.setTransactionCalls(((Number) source.get(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS)).longValue());
    applicationMetric.setTransactionErrorCalls(((Number) source.get(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_CALLS)).longValue());
    applicationMetric.setTransactionDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_TRANSACTION_DURATION_SUM)).longValue());
    applicationMetric.setTransactionErrorDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    applicationMetric.setTransactionAverageDuration(((Number) source.get(ApplicationMetricTable.COLUMN_TRANSACTION_AVERAGE_DURATION)).longValue());
    applicationMetric.setBusinessTransactionCalls(((Number) source.get(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS)).longValue());
    applicationMetric.setBusinessTransactionErrorCalls(((Number) source.get(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS)).longValue());
    applicationMetric.setBusinessTransactionDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM)).longValue());
    applicationMetric.setBusinessTransactionErrorDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    applicationMetric.setBusinessTransactionAverageDuration(((Number) source.get(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_AVERAGE_DURATION)).longValue());
    applicationMetric.setMqTransactionCalls(((Number) source.get(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_CALLS)).longValue());
    applicationMetric.setMqTransactionErrorCalls(((Number) source.get(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS)).longValue());
    applicationMetric.setMqTransactionDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM)).longValue());
    applicationMetric.setMqTransactionErrorDurationSum(((Number) source.get(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    applicationMetric.setMqTransactionAverageDuration(((Number) source.get(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_AVERAGE_DURATION)).longValue());
    applicationMetric.setSatisfiedCount(((Number) source.get(ApplicationMetricTable.COLUMN_SATISFIED_COUNT)).longValue());
    applicationMetric.setToleratingCount(((Number) source.get(ApplicationMetricTable.COLUMN_TOLERATING_COUNT)).longValue());
    applicationMetric.setFrustratedCount(((Number) source.get(ApplicationMetricTable.COLUMN_FRUSTRATED_COUNT)).longValue());
    applicationMetric.setTimeBucket(((Number) source.get(ApplicationMetricTable.COLUMN_TIME_BUCKET)).longValue());
    return applicationMetric;
}
Also used : ApplicationMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)

Aggregations

ApplicationMetric (org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric)9 RemoteSenderService (org.apache.skywalking.apm.collector.remote.service.RemoteSenderService)2 ApplicationReferenceMetric (org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric)1