chenmudu commented on a change in pull request #6888:
URL: https://github.com/apache/skywalking/pull/6888#discussion_r625227685



##########
File path: 
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/AlarmQuery.java
##########
@@ -62,11 +83,111 @@ public Alarms getAlarm(final Duration duration, final 
Scope scope, final String
         }
         long startSecondTB = 0;
         long endSecondTB = 0;
+        EventQueryCondition condition = new EventQueryCondition();
         if (nonNull(duration)) {
             startSecondTB = duration.getStartTimeBucketInSec();
             endSecondTB = duration.getEndTimeBucketInSec();
+            condition.setTime(duration);
+        }
+        Alarms alarms = getQueryService().getAlarm(
+                scopeId, keyword, paging, startSecondTB, endSecondTB, tags);
+        Events events = null;
+        try {
+            events = getEventQueryService().queryEvents(condition);

Review comment:
       > You were proposing the query protocol, with the event included in the 
alarm. Why are you asking me about this? If you are thinking about 2 steps 
query, why we haven't discussed this at the protocol level.
   
   Sorry, it was only after I received the request to narrow the scope of the 
query that I looked at the code and found that the current single-step query 
mode seemed unable to construct the query condition completely(The query 
criteria only have the **Scope Type**, without the  **Source values**.).
   That's why I brought up the topic of a two-step query. I would like to 
confirm with you that we may need to roll back the query-protocol to the 
previous version. Sorry for my mistake.
   
   if there are some problems in my way of asking questions, thanks for helping 
me to point out. I just want to do something to make SkyWalking to be 
better.Thanks for your reply.I'll pay attention next time.
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to