Search in sources :

Example 1 with ApplicationComponent

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

the class ApplicationComponentSpanListener method parseEntry.

@Override
public void parseEntry(SpanDecorator spanDecorator, int applicationId, int instanceId, String segmentId) {
    String metricId = String.valueOf(applicationId) + Const.ID_SPLIT + String.valueOf(spanDecorator.getComponentId());
    ApplicationComponent applicationComponent = new ApplicationComponent();
    applicationComponent.setMetricId(metricId);
    applicationComponent.setComponentId(spanDecorator.getComponentId());
    applicationComponent.setApplicationId(applicationId);
    applicationComponents.add(applicationComponent);
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Example 2 with ApplicationComponent

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

the class ApplicationComponentSpanListener method parseExit.

@Override
public void parseExit(SpanDecorator spanDecorator, int applicationId, int instanceId, String segmentId) {
    int applicationIdFromPeerId = applicationCacheService.getApplicationIdByAddressId(spanDecorator.getPeerId());
    String metricId = applicationIdFromPeerId + Const.ID_SPLIT + String.valueOf(spanDecorator.getComponentId());
    ApplicationComponent applicationComponent = new ApplicationComponent();
    applicationComponent.setMetricId(metricId);
    applicationComponent.setComponentId(spanDecorator.getComponentId());
    applicationComponent.setApplicationId(applicationIdFromPeerId);
    applicationComponents.add(applicationComponent);
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Example 3 with ApplicationComponent

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

the class ApplicationComponentCopy method copy.

public static ApplicationComponent copy(ApplicationComponent applicationComponent) {
    ApplicationComponent newApplicationComponent = new ApplicationComponent();
    newApplicationComponent.setId(applicationComponent.getId());
    newApplicationComponent.setMetricId(applicationComponent.getMetricId());
    newApplicationComponent.setComponentId(applicationComponent.getComponentId());
    newApplicationComponent.setApplicationId(applicationComponent.getApplicationId());
    newApplicationComponent.setTimeBucket(newApplicationComponent.getTimeBucket());
    return newApplicationComponent;
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Example 4 with ApplicationComponent

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

the class ApplicationComponentMonthTransformNode method process.

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

Example 5 with ApplicationComponent

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

the class AbstractApplicationComponentEsPersistenceDAO method esDataToStreamData.

@Override
protected final ApplicationComponent esDataToStreamData(Map<String, Object> source) {
    ApplicationComponent applicationComponent = new ApplicationComponent();
    applicationComponent.setMetricId((String) source.get(ApplicationComponentTable.COLUMN_METRIC_ID));
    applicationComponent.setComponentId(((Number) source.get(ApplicationComponentTable.COLUMN_COMPONENT_ID)).intValue());
    applicationComponent.setApplicationId(((Number) source.get(ApplicationComponentTable.COLUMN_APPLICATION_ID)).intValue());
    applicationComponent.setTimeBucket(((Number) source.get(ApplicationComponentTable.COLUMN_TIME_BUCKET)).longValue());
    return applicationComponent;
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Aggregations

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