Add new indicators and change two indicator names. (#1721)
This commit is contained in:
parent
abc15a361b
commit
750bca2241
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_avg", builder = EndpointAvgIndicator.Builder.class)
|
||||
public class EndpointAvgIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ public class EndpointAvgIndicator extends LongAvgIndicator implements AlarmSuppo
|
|||
}
|
||||
|
||||
@Override public AlarmMeta getAlarmMeta() {
|
||||
return new AlarmMeta("endpoint_Avg", Scope.Endpoint, entityId);
|
||||
return new AlarmMeta("endpoint_avg", Scope.Endpoint, entityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_p50", builder = EndpointP50Indicator.Builder.class)
|
||||
public class EndpointP50Indicator extends P50Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_p75", builder = EndpointP75Indicator.Builder.class)
|
||||
public class EndpointP75Indicator extends P75Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_p90", builder = EndpointP90Indicator.Builder.class)
|
||||
public class EndpointP90Indicator extends P90Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_p95", builder = EndpointP95Indicator.Builder.class)
|
||||
public class EndpointP95Indicator extends P95Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_p99", builder = EndpointP99Indicator.Builder.class)
|
||||
public class EndpointP99Indicator extends P99Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_sla", builder = EndpointSlaIndicator.Builder.class)
|
||||
public class EndpointSlaIndicator extends PercentIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_relation_cpm", builder = EndpointRelationCpmIndicator.Builder.class)
|
||||
public class EndpointRelationCpmIndicator extends CPMIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "child_service_id") private int childServiceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "endpoint_relation_resp_time", builder = EndpointRelationRespTimeIndicator.Builder.class)
|
||||
public class EndpointRelationRespTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
@Setter @Getter @Column(columnName = "child_service_id") private int childServiceId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_cpm", builder = ServiceCpmIndicator.Builder.class)
|
||||
public class ServiceCpmIndicator extends CPMIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_p50", builder = ServiceP50Indicator.Builder.class)
|
||||
public class ServiceP50Indicator extends P50Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_p75", builder = ServiceP75Indicator.Builder.class)
|
||||
public class ServiceP75Indicator extends P75Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_p90", builder = ServiceP90Indicator.Builder.class)
|
||||
public class ServiceP90Indicator extends P90Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_p95", builder = ServiceP95Indicator.Builder.class)
|
||||
public class ServiceP95Indicator extends P95Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_p99", builder = ServiceP99Indicator.Builder.class)
|
||||
public class ServiceP99Indicator extends P99Indicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_resp_time", builder = ServiceRespTimeIndicator.Builder.class)
|
||||
public class ServiceRespTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_sla", builder = ServiceSlaIndicator.Builder.class)
|
||||
public class ServiceSlaIndicator extends PercentIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_instance_cpm", builder = ServiceInstanceCpmIndicator.Builder.class)
|
||||
public class ServiceInstanceCpmIndicator extends CPMIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
*/
|
||||
@IndicatorType
|
||||
@StreamData
|
||||
@StorageEntity(name = "serviceinstance_resp_time", builder = ServiceInstanceRespTimeIndicator.Builder.class)
|
||||
@StorageEntity(name = "service_instance_resp_time", builder = ServiceInstanceRespTimeIndicator.Builder.class)
|
||||
public class ServiceInstanceRespTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_id") private int serviceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
@ -112,7 +112,7 @@ public class ServiceInstanceRespTimeIndicator extends LongAvgIndicator implement
|
|||
}
|
||||
|
||||
@Override public AlarmMeta getAlarmMeta() {
|
||||
return new AlarmMeta("serviceInstance_resp_time", Scope.ServiceInstance, entityId);
|
||||
return new AlarmMeta("service_instance_resp_time", Scope.ServiceInstance, entityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_cpu", builder = InstanceJvmCpuIndicator.Builder.class)
|
||||
public class InstanceJvmCpuIndicator extends DoubleAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_old_gc_count", builder = InstanceJvmOldGcCountIndicator.Builder.class)
|
||||
public class InstanceJvmOldGcCountIndicator extends SumIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_old_gc_time", builder = InstanceJvmOldGcTimeIndicator.Builder.class)
|
||||
public class InstanceJvmOldGcTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_young_gc_count", builder = InstanceJvmYoungGcCountIndicator.Builder.class)
|
||||
public class InstanceJvmYoungGcCountIndicator extends SumIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_young_gc_time", builder = InstanceJvmYoungGcTimeIndicator.Builder.class)
|
||||
public class InstanceJvmYoungGcTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_memory_heap", builder = InstanceJvmMemoryHeapIndicator.Builder.class)
|
||||
public class InstanceJvmMemoryHeapIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.core.analysis.generated.serviceinstancejvmmemory;
|
||||
|
||||
import java.util.*;
|
||||
import lombok.*;
|
||||
import org.apache.skywalking.oap.server.core.Const;
|
||||
import org.apache.skywalking.oap.server.core.alarm.AlarmMeta;
|
||||
import org.apache.skywalking.oap.server.core.alarm.AlarmSupported;
|
||||
import org.apache.skywalking.oap.server.core.analysis.indicator.*;
|
||||
import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType;
|
||||
import org.apache.skywalking.oap.server.core.remote.annotation.StreamData;
|
||||
import org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData;
|
||||
import org.apache.skywalking.oap.server.core.storage.annotation.*;
|
||||
import org.apache.skywalking.oap.server.core.storage.StorageBuilder;
|
||||
import org.apache.skywalking.oap.server.core.source.Scope;
|
||||
|
||||
/**
|
||||
* This class is auto generated. Please don't change this class manually.
|
||||
*
|
||||
* @author Observability Analysis Language code generator
|
||||
*/
|
||||
@IndicatorType
|
||||
@StreamData
|
||||
@StorageEntity(name = "instance_jvm_memory_heap_max", builder = InstanceJvmMemoryHeapMaxIndicator.Builder.class)
|
||||
public class InstanceJvmMemoryHeapMaxIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
splitJointId += Const.ID_SPLIT + entityId;
|
||||
return splitJointId;
|
||||
}
|
||||
|
||||
@Override public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + entityId.hashCode();
|
||||
result = 31 * result + (int)getTimeBucket();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override public int remoteHashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + entityId.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = (InstanceJvmMemoryHeapMaxIndicator)obj;
|
||||
if (entityId != indicator.entityId)
|
||||
return false;
|
||||
|
||||
if (getTimeBucket() != indicator.getTimeBucket())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public RemoteData.Builder serialize() {
|
||||
RemoteData.Builder remoteBuilder = RemoteData.newBuilder();
|
||||
remoteBuilder.setDataStrings(0, getEntityId());
|
||||
|
||||
remoteBuilder.setDataLongs(0, getSummation());
|
||||
remoteBuilder.setDataLongs(1, getValue());
|
||||
remoteBuilder.setDataLongs(2, getTimeBucket());
|
||||
|
||||
|
||||
remoteBuilder.setDataIntegers(0, getServiceInstanceId());
|
||||
remoteBuilder.setDataIntegers(1, getCount());
|
||||
|
||||
return remoteBuilder;
|
||||
}
|
||||
|
||||
@Override public void deserialize(RemoteData remoteData) {
|
||||
setEntityId(remoteData.getDataStrings(0));
|
||||
|
||||
setSummation(remoteData.getDataLongs(0));
|
||||
setValue(remoteData.getDataLongs(1));
|
||||
setTimeBucket(remoteData.getDataLongs(2));
|
||||
|
||||
|
||||
setServiceInstanceId(remoteData.getDataIntegers(0));
|
||||
setCount(remoteData.getDataIntegers(1));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override public AlarmMeta getAlarmMeta() {
|
||||
return new AlarmMeta("instance_jvm_memory_heap_max", Scope.ServiceInstanceJVMMemory, entityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toHour() {
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = new InstanceJvmMemoryHeapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInHour());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toDay() {
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = new InstanceJvmMemoryHeapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInDay());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toMonth() {
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = new InstanceJvmMemoryHeapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInMonth());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public static class Builder implements StorageBuilder<InstanceJvmMemoryHeapMaxIndicator> {
|
||||
|
||||
@Override public Map<String, Object> data2Map(InstanceJvmMemoryHeapMaxIndicator storageData) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("entity_id", storageData.getEntityId());
|
||||
map.put("service_instance_id", storageData.getServiceInstanceId());
|
||||
map.put("summation", storageData.getSummation());
|
||||
map.put("count", storageData.getCount());
|
||||
map.put("value", storageData.getValue());
|
||||
map.put("time_bucket", storageData.getTimeBucket());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override public InstanceJvmMemoryHeapMaxIndicator map2Data(Map<String, Object> dbMap) {
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = new InstanceJvmMemoryHeapMaxIndicator();
|
||||
indicator.setEntityId((String)dbMap.get("entity_id"));
|
||||
indicator.setServiceInstanceId(((Number)dbMap.get("service_instance_id")).intValue());
|
||||
indicator.setSummation(((Number)dbMap.get("summation")).longValue());
|
||||
indicator.setCount(((Number)dbMap.get("count")).intValue());
|
||||
indicator.setValue(((Number)dbMap.get("value")).longValue());
|
||||
indicator.setTimeBucket(((Number)dbMap.get("time_bucket")).longValue());
|
||||
return indicator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "instance_jvm_memory_noheap", builder = InstanceJvmMemoryNoheapIndicator.Builder.class)
|
||||
public class InstanceJvmMemoryNoheapIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.oap.server.core.analysis.generated.serviceinstancejvmmemory;
|
||||
|
||||
import java.util.*;
|
||||
import lombok.*;
|
||||
import org.apache.skywalking.oap.server.core.Const;
|
||||
import org.apache.skywalking.oap.server.core.alarm.AlarmMeta;
|
||||
import org.apache.skywalking.oap.server.core.alarm.AlarmSupported;
|
||||
import org.apache.skywalking.oap.server.core.analysis.indicator.*;
|
||||
import org.apache.skywalking.oap.server.core.analysis.indicator.annotation.IndicatorType;
|
||||
import org.apache.skywalking.oap.server.core.remote.annotation.StreamData;
|
||||
import org.apache.skywalking.oap.server.core.remote.grpc.proto.RemoteData;
|
||||
import org.apache.skywalking.oap.server.core.storage.annotation.*;
|
||||
import org.apache.skywalking.oap.server.core.storage.StorageBuilder;
|
||||
import org.apache.skywalking.oap.server.core.source.Scope;
|
||||
|
||||
/**
|
||||
* This class is auto generated. Please don't change this class manually.
|
||||
*
|
||||
* @author Observability Analysis Language code generator
|
||||
*/
|
||||
@IndicatorType
|
||||
@StreamData
|
||||
@StorageEntity(name = "instance_jvm_memory_noheap_max", builder = InstanceJvmMemoryNoheapMaxIndicator.Builder.class)
|
||||
public class InstanceJvmMemoryNoheapMaxIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "entity_id") @IDColumn private java.lang.String entityId;
|
||||
@Setter @Getter @Column(columnName = "service_instance_id") private int serviceInstanceId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
splitJointId += Const.ID_SPLIT + entityId;
|
||||
return splitJointId;
|
||||
}
|
||||
|
||||
@Override public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + entityId.hashCode();
|
||||
result = 31 * result + (int)getTimeBucket();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override public int remoteHashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + entityId.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = (InstanceJvmMemoryNoheapMaxIndicator)obj;
|
||||
if (entityId != indicator.entityId)
|
||||
return false;
|
||||
|
||||
if (getTimeBucket() != indicator.getTimeBucket())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public RemoteData.Builder serialize() {
|
||||
RemoteData.Builder remoteBuilder = RemoteData.newBuilder();
|
||||
remoteBuilder.setDataStrings(0, getEntityId());
|
||||
|
||||
remoteBuilder.setDataLongs(0, getSummation());
|
||||
remoteBuilder.setDataLongs(1, getValue());
|
||||
remoteBuilder.setDataLongs(2, getTimeBucket());
|
||||
|
||||
|
||||
remoteBuilder.setDataIntegers(0, getServiceInstanceId());
|
||||
remoteBuilder.setDataIntegers(1, getCount());
|
||||
|
||||
return remoteBuilder;
|
||||
}
|
||||
|
||||
@Override public void deserialize(RemoteData remoteData) {
|
||||
setEntityId(remoteData.getDataStrings(0));
|
||||
|
||||
setSummation(remoteData.getDataLongs(0));
|
||||
setValue(remoteData.getDataLongs(1));
|
||||
setTimeBucket(remoteData.getDataLongs(2));
|
||||
|
||||
|
||||
setServiceInstanceId(remoteData.getDataIntegers(0));
|
||||
setCount(remoteData.getDataIntegers(1));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override public AlarmMeta getAlarmMeta() {
|
||||
return new AlarmMeta("instance_jvm_memory_noheap_max", Scope.ServiceInstanceJVMMemory, entityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toHour() {
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = new InstanceJvmMemoryNoheapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInHour());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toDay() {
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = new InstanceJvmMemoryNoheapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInDay());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Indicator toMonth() {
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = new InstanceJvmMemoryNoheapMaxIndicator();
|
||||
indicator.setTimeBucket(toTimeBucketInMonth());
|
||||
indicator.setEntityId(this.getEntityId());
|
||||
indicator.setServiceInstanceId(this.getServiceInstanceId());
|
||||
indicator.setSummation(this.getSummation());
|
||||
indicator.setCount(this.getCount());
|
||||
indicator.setValue(this.getValue());
|
||||
indicator.setTimeBucket(this.getTimeBucket());
|
||||
return indicator;
|
||||
}
|
||||
|
||||
public static class Builder implements StorageBuilder<InstanceJvmMemoryNoheapMaxIndicator> {
|
||||
|
||||
@Override public Map<String, Object> data2Map(InstanceJvmMemoryNoheapMaxIndicator storageData) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("entity_id", storageData.getEntityId());
|
||||
map.put("service_instance_id", storageData.getServiceInstanceId());
|
||||
map.put("summation", storageData.getSummation());
|
||||
map.put("count", storageData.getCount());
|
||||
map.put("value", storageData.getValue());
|
||||
map.put("time_bucket", storageData.getTimeBucket());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override public InstanceJvmMemoryNoheapMaxIndicator map2Data(Map<String, Object> dbMap) {
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = new InstanceJvmMemoryNoheapMaxIndicator();
|
||||
indicator.setEntityId((String)dbMap.get("entity_id"));
|
||||
indicator.setServiceInstanceId(((Number)dbMap.get("service_instance_id")).intValue());
|
||||
indicator.setSummation(((Number)dbMap.get("summation")).longValue());
|
||||
indicator.setCount(((Number)dbMap.get("count")).intValue());
|
||||
indicator.setValue(((Number)dbMap.get("value")).longValue());
|
||||
indicator.setTimeBucket(((Number)dbMap.get("time_bucket")).longValue());
|
||||
return indicator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,8 @@ public class ServiceInstanceJVMMemoryDispatcher implements SourceDispatcher<Serv
|
|||
@Override public void dispatch(ServiceInstanceJVMMemory source) {
|
||||
doInstanceJvmMemoryHeap(source);
|
||||
doInstanceJvmMemoryNoheap(source);
|
||||
doInstanceJvmMemoryHeapMax(source);
|
||||
doInstanceJvmMemoryNoheapMax(source);
|
||||
}
|
||||
|
||||
private void doInstanceJvmMemoryHeap(ServiceInstanceJVMMemory source) {
|
||||
|
|
@ -45,7 +47,7 @@ public class ServiceInstanceJVMMemoryDispatcher implements SourceDispatcher<Serv
|
|||
indicator.setTimeBucket(source.getTimeBucket());
|
||||
indicator.setEntityId(source.getEntityId());
|
||||
indicator.setServiceInstanceId(source.getServiceInstanceId());
|
||||
indicator.combine(source.getMax(), 1);
|
||||
indicator.combine(source.getUsed(), 1);
|
||||
IndicatorProcess.INSTANCE.in(indicator);
|
||||
}
|
||||
private void doInstanceJvmMemoryNoheap(ServiceInstanceJVMMemory source) {
|
||||
|
|
@ -55,6 +57,32 @@ public class ServiceInstanceJVMMemoryDispatcher implements SourceDispatcher<Serv
|
|||
return;
|
||||
}
|
||||
|
||||
indicator.setTimeBucket(source.getTimeBucket());
|
||||
indicator.setEntityId(source.getEntityId());
|
||||
indicator.setServiceInstanceId(source.getServiceInstanceId());
|
||||
indicator.combine(source.getUsed(), 1);
|
||||
IndicatorProcess.INSTANCE.in(indicator);
|
||||
}
|
||||
private void doInstanceJvmMemoryHeapMax(ServiceInstanceJVMMemory source) {
|
||||
InstanceJvmMemoryHeapMaxIndicator indicator = new InstanceJvmMemoryHeapMaxIndicator();
|
||||
|
||||
if (!new EqualMatch().setLeft(source.isHeapStatus()).setRight(true).match()) {
|
||||
return;
|
||||
}
|
||||
|
||||
indicator.setTimeBucket(source.getTimeBucket());
|
||||
indicator.setEntityId(source.getEntityId());
|
||||
indicator.setServiceInstanceId(source.getServiceInstanceId());
|
||||
indicator.combine(source.getMax(), 1);
|
||||
IndicatorProcess.INSTANCE.in(indicator);
|
||||
}
|
||||
private void doInstanceJvmMemoryNoheapMax(ServiceInstanceJVMMemory source) {
|
||||
InstanceJvmMemoryNoheapMaxIndicator indicator = new InstanceJvmMemoryNoheapMaxIndicator();
|
||||
|
||||
if (!new EqualMatch().setLeft(source.isHeapStatus()).setRight(false).match()) {
|
||||
return;
|
||||
}
|
||||
|
||||
indicator.setTimeBucket(source.getTimeBucket());
|
||||
indicator.setEntityId(source.getEntityId());
|
||||
indicator.setServiceInstanceId(source.getServiceInstanceId());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_client_call_sla", builder = ServiceRelationClientCallSlaIndicator.Builder.class)
|
||||
public class ServiceRelationClientCallSlaIndicator extends PercentIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_client_cpm", builder = ServiceRelationClientCpmIndicator.Builder.class)
|
||||
public class ServiceRelationClientCpmIndicator extends CPMIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_client_resp_time", builder = ServiceRelationClientRespTimeIndicator.Builder.class)
|
||||
public class ServiceRelationClientRespTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_server_call_sla", builder = ServiceRelationServerCallSlaIndicator.Builder.class)
|
||||
public class ServiceRelationServerCallSlaIndicator extends PercentIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_server_cpm", builder = ServiceRelationServerCpmIndicator.Builder.class)
|
||||
public class ServiceRelationServerCpmIndicator extends CPMIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import org.apache.skywalking.oap.server.core.source.Scope;
|
|||
@StorageEntity(name = "service_relation_server_resp_time", builder = ServiceRelationServerRespTimeIndicator.Builder.class)
|
||||
public class ServiceRelationServerRespTimeIndicator extends LongAvgIndicator implements AlarmSupported {
|
||||
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private String entityId;
|
||||
@Setter @Getter @Column(columnName = "source_service_id") @IDColumn private java.lang.String entityId;
|
||||
|
||||
@Override public String id() {
|
||||
String splitJointId = String.valueOf(getTimeBucket());
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ service_relation_client_resp_time = from(ServiceRelation.latency).filter(detectP
|
|||
service_relation_server_resp_time = from(ServiceRelation.latency).filter(detectPoint == DetectPoint.SERVER).longAvg();
|
||||
|
||||
// Service Instance Scope metric
|
||||
serviceInstance_resp_time= from(ServiceInstance.latency).longAvg();
|
||||
service_instance_resp_time= from(ServiceInstance.latency).longAvg();
|
||||
service_instance_cpm = from(ServiceInstance.*).cpm();
|
||||
|
||||
// Endpoint scope metric
|
||||
endpoint_Avg = from(Endpoint.latency).longAvg();
|
||||
endpoint_avg = from(Endpoint.latency).longAvg();
|
||||
endpoint_sla = from(Endpoint.*).percent(status == true);
|
||||
endpoint_p99 = from(Endpoint.latency).p99(10);
|
||||
endpoint_p95 = from(Endpoint.latency).p95(10);
|
||||
|
|
@ -61,9 +61,11 @@ endpoint_relation_resp_time = from(EndpointRelation.rpcLatency).filter(detectPoi
|
|||
|
||||
// JVM instance metric
|
||||
instance_jvm_cpu = from(ServiceInstanceJVMCPU.usePercent).doubleAvg();
|
||||
instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.max).filter(isHeap == true).longAvg();
|
||||
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.max).filter(isHeap == false).longAvg();
|
||||
instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == true).longAvg();
|
||||
instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.used).filter(heapStatus == false).longAvg();
|
||||
instance_jvm_memory_heap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
|
||||
instance_jvm_memory_noheap_max = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
|
||||
instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).longAvg();
|
||||
instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).longAvg();
|
||||
instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();
|
||||
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();
|
||||
instance_jvm_old_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.OLD).sum();
|
||||
Loading…
Reference in New Issue