Add `normal` to listService query and support `scope=ALL` for global level metrics (#8463)

This commit is contained in:
wankai123 2022-01-21 19:32:21 +08:00 committed by GitHub
parent 2c8504a3ed
commit 012d58a8fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 6 deletions

View File

@ -34,6 +34,8 @@ Release Notes.
* Support ZGC GC time and count metric collecting.
* Sync proto buffers files from upstream Envoy (Related to https://github.com/envoyproxy/envoy/pull/18955).
* Bump up GraphQL related dependencies to latest versions.
* Add `normal` to V9 service meta query.
* Support `scope=ALL` catalog for metrics.
#### UI

View File

@ -38,7 +38,7 @@ public class MetricDefinition {
private MetricsType type;
/**
* Catalog includes SERVICE_CATALOG,SERVICE_INSTANCE_CATALOG,ENDPOINT_CATALOG,
* SERVICE_RELATION_CATALOG,SERVICE_INSTANCE_RELATION_CATALOG_NAME,ENDPOINT_RELATION_CATALOG_NAME
* SERVICE_RELATION_CATALOG,SERVICE_INSTANCE_RELATION_CATALOG_NAME,ENDPOINT_RELATION_CATALOG_NAME,ALL
*/
private String catalog;
}

View File

@ -23,14 +23,30 @@ import java.util.Set;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.skywalking.oap.server.core.analysis.IDManager;
@Getter
@Setter
@EqualsAndHashCode
public class Service {
@Getter
private String id;
@Getter
@Setter
private String name;
@Getter
@Setter
private String shortName;
@Getter
@Setter
private String group;
@Getter
private boolean normal;
@Getter
@Setter
private Set<String> layers = new HashSet<>();
public void setId(String id) {
this.id = id;
IDManager.ServiceID.ServiceIDDefinition def = IDManager.ServiceID.analysisId(id);
this.normal = def.isReal();
}
}

View File

@ -306,7 +306,7 @@ public class DefaultScopeDefine {
* Get the catalog string name of the given scope
*
* @param scope id of the source scope.
* @return literal string name of the catalog owning the scope.
* @return literal string name of the catalog owning the scope. Return `ALL` by default.
*/
public static String catalogOf(int scope) {
if (inServiceCatalog(scope)) {
@ -327,7 +327,7 @@ public class DefaultScopeDefine {
if (inEndpointRelationCatalog(scope)) {
return ENDPOINT_RELATION_CATALOG_NAME;
}
return "UNKNOWN";
return "ALL";
}
/**

@ -1 +1 @@
Subproject commit d9039e01767bc79e845bb32dbbeb6cdf74403af5
Subproject commit d6e294735ab43b2fa9e70b11c91d85268591dec0