You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/05/27 04:06:14 UTC
[skywalking] branch master updated: Fix wrong service instance id
in alarm query (#7023)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 1a72758 Fix wrong service instance id in alarm query (#7023)
1a72758 is described below
commit 1a727585f9dda73f26e6ac8ee2fe4a80a5994263
Author: Zhenxu Ke <ke...@apache.org>
AuthorDate: Thu May 27 12:05:54 2021 +0800
Fix wrong service instance id in alarm query (#7023)
---
.../org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
index cb63af7..dd531f7 100644
--- a/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
+++ b/oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
@@ -186,15 +186,16 @@ public class AlarmQuery implements GraphQLQueryResolver {
}
final String service = source.getService();
+ final String serviceId = IDManager.ServiceID.buildId(service, true);
if (isNullOrEmpty(service)) {
return "";
}
final String instance = source.getServiceInstance();
if (isNullOrEmpty(instance)) {
- return IDManager.ServiceID.buildId(service, true);
+ return serviceId;
}
- return IDManager.ServiceInstanceID.buildId(service, instance);
+ return IDManager.ServiceInstanceID.buildId(serviceId, instance);
}
}