Search in sources :

Example 11 with ServiceReferenceMetric

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

the class ServiceReferenceHourMetricTransformNode method process.

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

Example 12 with ServiceReferenceMetric

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

the class InstanceReferenceMetricGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Graph<ServiceReferenceMetric> graph = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.INSTANCE_REFERENCE_METRIC_GRAPH_ID, ServiceReferenceMetric.class);
    Node<InstanceReferenceMetric, InstanceReferenceMetric> remoteNode = graph.addNode(new InstanceReferenceMinuteMetricAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new InstanceReferenceMinuteMetricRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.INSTANCE_REFERENCE_METRIC_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new InstanceReferenceMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceReferenceHourMetricTransformNode()).addNext(new InstanceReferenceHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceReferenceDayMetricTransformNode()).addNext(new InstanceReferenceDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new InstanceReferenceMonthMetricTransformNode()).addNext(new InstanceReferenceMonthMetricPersistenceWorker.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) InstanceReferenceMetric(org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric)

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