Search in sources :

Example 1 with ServiceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric in project incubator-skywalking by apache.

the class ServiceMetricGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Graph<ServiceReferenceMetric> graph = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.SERVICE_METRIC_GRAPH_ID, ServiceReferenceMetric.class);
    Node<ServiceMetric, ServiceMetric> remoteNode = graph.addNode(new ServiceMetricMinuteAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ServiceMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.SERVICE_METRIC_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new ServiceMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceHourMetricTransformNode()).addNext(new ServiceHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceDayMetricTransformNode()).addNext(new ServiceDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceMonthMetricTransformNode()).addNext(new ServiceMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    link(graph);
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) ServiceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric) ServiceMetric(org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric)

Example 2 with ServiceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric in project incubator-skywalking by apache.

the class ServiceReferenceMetricGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Node<ServiceReferenceMetric, ServiceReferenceMetric> remoteNode = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.SERVICE_REFERENCE_METRIC_GRAPH_ID, ServiceReferenceMetric.class).addNode(new ServiceReferenceMinuteMetricAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ServiceReferenceMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.SERVICE_REFERENCE_METRIC_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new ServiceReferenceMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceReferenceHourMetricTransformNode()).addNext(new ServiceReferenceHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceReferenceDayMetricTransformNode()).addNext(new ServiceReferenceDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ServiceReferenceMonthMetricTransformNode()).addNext(new ServiceReferenceMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) ServiceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric)

Example 3 with ServiceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric in project incubator-skywalking by apache.

the class ServiceReferenceMetricCopy method copy.

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

Example 4 with ServiceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric in project incubator-skywalking by apache.

the class ServiceReferenceMetricSpanListener method parseExit.

@Override
public void parseExit(SpanDecorator spanDecorator, int applicationId, int instanceId, String segmentId) {
    ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric();
    int peerId = spanDecorator.getPeerId();
    int behindApplicationId = applicationCacheService.getApplicationIdByAddressId(peerId);
    int behindInstanceId = instanceCacheService.getInstanceIdByAddressId(behindApplicationId, peerId);
    serviceReferenceMetric.setFrontServiceId(Const.NONE_SERVICE_ID);
    serviceReferenceMetric.setFrontInstanceId(instanceId);
    serviceReferenceMetric.setFrontApplicationId(applicationId);
    serviceReferenceMetric.setBehindServiceId(spanDecorator.getOperationNameId());
    serviceReferenceMetric.setBehindInstanceId(behindInstanceId);
    serviceReferenceMetric.setBehindApplicationId(behindApplicationId);
    serviceReferenceMetric.setSourceValue(MetricSource.Caller.getValue());
    calculateDuration(serviceReferenceMetric, spanDecorator);
    exitReferenceMetric.add(serviceReferenceMetric);
}
Also used : ServiceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric)

Example 5 with ServiceReferenceMetric

use of org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric in project incubator-skywalking by apache.

the class AbstractServiceReferenceMetricEsPersistenceDAO method esDataToStreamData.

@Override
protected final ServiceReferenceMetric esDataToStreamData(Map<String, Object> source) {
    ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric();
    serviceReferenceMetric.setMetricId((String) source.get(ServiceReferenceMetricTable.COLUMN_METRIC_ID));
    serviceReferenceMetric.setFrontApplicationId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID)).intValue());
    serviceReferenceMetric.setBehindApplicationId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID)).intValue());
    serviceReferenceMetric.setFrontInstanceId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID)).intValue());
    serviceReferenceMetric.setBehindInstanceId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID)).intValue());
    serviceReferenceMetric.setFrontServiceId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID)).intValue());
    serviceReferenceMetric.setBehindServiceId(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID)).intValue());
    serviceReferenceMetric.setSourceValue(((Number) source.get(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE)).intValue());
    serviceReferenceMetric.setTransactionCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS)).longValue());
    serviceReferenceMetric.setTransactionErrorCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS)).longValue());
    serviceReferenceMetric.setTransactionDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM)).longValue());
    serviceReferenceMetric.setTransactionErrorDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    serviceReferenceMetric.setTransactionAverageDuration(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TRANSACTION_AVERAGE_DURATION)).longValue());
    serviceReferenceMetric.setBusinessTransactionCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS)).longValue());
    serviceReferenceMetric.setBusinessTransactionErrorCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS)).longValue());
    serviceReferenceMetric.setBusinessTransactionDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM)).longValue());
    serviceReferenceMetric.setBusinessTransactionErrorDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    serviceReferenceMetric.setBusinessTransactionAverageDuration(((Number) source.get(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_AVERAGE_DURATION)).longValue());
    serviceReferenceMetric.setMqTransactionCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS)).longValue());
    serviceReferenceMetric.setMqTransactionErrorCalls(((Number) source.get(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS)).longValue());
    serviceReferenceMetric.setMqTransactionDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM)).longValue());
    serviceReferenceMetric.setMqTransactionErrorDurationSum(((Number) source.get(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM)).longValue());
    serviceReferenceMetric.setMqTransactionAverageDuration(((Number) source.get(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_AVERAGE_DURATION)).longValue());
    serviceReferenceMetric.setTimeBucket(((Number) source.get(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET)).longValue());
    return serviceReferenceMetric;
}
Also used : ServiceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric)

Aggregations

ServiceReferenceMetric (org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric)12 RemoteSenderService (org.apache.skywalking.apm.collector.remote.service.RemoteSenderService)4 ReferenceDecorator (org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator)1 InstanceReferenceMetric (org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)1 ServiceMetric (org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric)1