Search in sources :

Example 1 with InstanceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric in project incubator-skywalking by apache.

the class ApplicationReferenceMetricGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Graph<InstanceReferenceMetric> graph = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.APPLICATION_REFERENCE_METRIC_GRAPH_ID, InstanceReferenceMetric.class);
    Node<ApplicationReferenceMetric, ApplicationReferenceMetric> remoteNode = graph.addNode(new ApplicationReferenceMinuteMetricAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ApplicationReferenceMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.APPLICATION_REFERENCE_METRIC_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new ApplicationReferenceMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationReferenceHourMetricTransformNode()).addNext(new ApplicationReferenceHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationReferenceDayMetricTransformNode()).addNext(new ApplicationReferenceDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationReferenceMonthMetricTransformNode()).addNext(new ApplicationReferenceMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    link(graph);
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric) ApplicationReferenceMetric(org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric)

Example 2 with InstanceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric in project incubator-skywalking by apache.

the class InstanceReferenceMonthMetricTransformNode method process.

@Override
public void process(InstanceReferenceMetric instanceReferenceMetric, Next<InstanceReferenceMetric> next) {
    long timeBucket = TimeBucketUtils.INSTANCE.minuteToMonth(instanceReferenceMetric.getTimeBucket());
    InstanceReferenceMetric newInstanceReferenceMetric = InstanceReferenceMetricCopy.copy(instanceReferenceMetric);
    newInstanceReferenceMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceReferenceMetric.getMetricId());
    newInstanceReferenceMetric.setTimeBucket(timeBucket);
    next.execute(newInstanceReferenceMetric);
}
Also used : InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)

Example 3 with InstanceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric in project incubator-skywalking by apache.

the class AbstractInstanceReferenceMetricH2PersistenceDAO method h2DataToStreamData.

@Override
protected final InstanceReferenceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
    InstanceReferenceMetric instanceReferenceMetric = new InstanceReferenceMetric();
    instanceReferenceMetric.setId(resultSet.getString(InstanceReferenceMetricTable.COLUMN_ID));
    instanceReferenceMetric.setMetricId(resultSet.getString(InstanceReferenceMetricTable.COLUMN_METRIC_ID));
    instanceReferenceMetric.setFrontApplicationId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
    instanceReferenceMetric.setBehindApplicationId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID));
    instanceReferenceMetric.setFrontInstanceId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID));
    instanceReferenceMetric.setBehindInstanceId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID));
    instanceReferenceMetric.setSourceValue(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE));
    instanceReferenceMetric.setTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
    instanceReferenceMetric.setTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
    instanceReferenceMetric.setTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
    instanceReferenceMetric.setTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
    instanceReferenceMetric.setTransactionAverageDuration(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_AVERAGE_DURATION));
    instanceReferenceMetric.setBusinessTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
    instanceReferenceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
    instanceReferenceMetric.setBusinessTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
    instanceReferenceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
    instanceReferenceMetric.setBusinessTransactionAverageDuration(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_AVERAGE_DURATION));
    instanceReferenceMetric.setMqTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
    instanceReferenceMetric.setMqTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
    instanceReferenceMetric.setMqTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
    instanceReferenceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
    instanceReferenceMetric.setMqTransactionAverageDuration(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_AVERAGE_DURATION));
    instanceReferenceMetric.setTimeBucket(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET));
    return instanceReferenceMetric;
}
Also used : InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)

Example 4 with InstanceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric in project incubator-skywalking by apache.

the class InstanceMetricGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Graph<InstanceReferenceMetric> graph = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.INSTANCE_METRIC_GRAPH_ID, InstanceReferenceMetric.class);
    Node<InstanceMetric, InstanceMetric> remoteNode = graph.addNode(new InstanceMinuteMetricAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new InstanceMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.INSTANCE_METRIC_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new InstanceMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceHourMetricTransformNode()).addNext(new InstanceHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceDayMetricTransformNode()).addNext(new InstanceDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceMonthMetricTransformNode()).addNext(new InstanceMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    link(graph);
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric) InstanceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric)

Example 5 with InstanceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric in project incubator-skywalking by apache.

the class InstanceReferenceMetricCopy method copy.

public static InstanceReferenceMetric copy(InstanceReferenceMetric instanceReferenceMetric) {
    InstanceReferenceMetric newInstanceReferenceMetric = new InstanceReferenceMetric();
    newInstanceReferenceMetric.setId(instanceReferenceMetric.getId());
    newInstanceReferenceMetric.setMetricId(instanceReferenceMetric.getMetricId());
    newInstanceReferenceMetric.setSourceValue(instanceReferenceMetric.getSourceValue());
    newInstanceReferenceMetric.setFrontApplicationId(instanceReferenceMetric.getFrontApplicationId());
    newInstanceReferenceMetric.setFrontInstanceId(instanceReferenceMetric.getFrontInstanceId());
    newInstanceReferenceMetric.setBehindApplicationId(instanceReferenceMetric.getBehindApplicationId());
    newInstanceReferenceMetric.setBehindInstanceId(instanceReferenceMetric.getBehindInstanceId());
    newInstanceReferenceMetric.setTransactionCalls(instanceReferenceMetric.getTransactionCalls());
    newInstanceReferenceMetric.setTransactionDurationSum(instanceReferenceMetric.getTransactionDurationSum());
    newInstanceReferenceMetric.setTransactionErrorCalls(instanceReferenceMetric.getTransactionErrorCalls());
    newInstanceReferenceMetric.setTransactionErrorDurationSum(instanceReferenceMetric.getTransactionErrorDurationSum());
    newInstanceReferenceMetric.setBusinessTransactionCalls(instanceReferenceMetric.getBusinessTransactionCalls());
    newInstanceReferenceMetric.setBusinessTransactionDurationSum(instanceReferenceMetric.getBusinessTransactionDurationSum());
    newInstanceReferenceMetric.setBusinessTransactionErrorCalls(instanceReferenceMetric.getBusinessTransactionErrorCalls());
    newInstanceReferenceMetric.setBusinessTransactionErrorDurationSum(instanceReferenceMetric.getBusinessTransactionErrorDurationSum());
    newInstanceReferenceMetric.setMqTransactionCalls(instanceReferenceMetric.getMqTransactionCalls());
    newInstanceReferenceMetric.setMqTransactionDurationSum(instanceReferenceMetric.getMqTransactionDurationSum());
    newInstanceReferenceMetric.setMqTransactionErrorCalls(instanceReferenceMetric.getMqTransactionErrorCalls());
    newInstanceReferenceMetric.setMqTransactionErrorDurationSum(instanceReferenceMetric.getMqTransactionErrorDurationSum());
    newInstanceReferenceMetric.setTimeBucket(instanceReferenceMetric.getTimeBucket());
    return newInstanceReferenceMetric;
}
Also used : InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)

Aggregations

InstanceReferenceMetric (org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)11 RemoteSenderService (org.apache.skywalking.apm.collector.remote.service.RemoteSenderService)4 ApplicationReferenceMetric (org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric)1 InstanceMetric (org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric)1 ServiceReferenceMetric (org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric)1