You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/01/25 15:27:21 UTC

[GitHub] [skywalking-query-protocol] kezhenxu94 commented on a change in pull request #51: Add query protocol for events

kezhenxu94 commented on a change in pull request #51:
URL: https://github.com/apache/skywalking-query-protocol/pull/51#discussion_r563810728



##########
File path: event.graphqls
##########
@@ -0,0 +1,64 @@
+# 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.
+
+scalar Long
+
+type Event {
+    uuid: String!
+    source: Source!
+    name: String!
+    type: Type!
+    message: String
+    parameters: String
+    startTime: Long!
+    endTime: Long
+}
+
+type Source {
+    service: String
+    serviceInstance: String
+    endpoint: String
+}
+
+input SourceInput {
+    service: String
+    serviceInstance: String
+    endpoint: String
+}
+
+enum Type {
+    Normal
+    Error
+}
+
+type Events {
+    events: [Event!]!
+    total: Int!
+}
+
+input EventQueryCondition {
+    uuid: String
+    source: SourceInput
+    name: String
+    type: Type
+    time: Duration
+    order: Order
+    pagination: Pagination!

Review comment:
       > @wu-sheng, are you arguing against providing pagination? If so, why?
   > 
   > I don't see how you could get away without pagination unless it's always returning all results and that seems like an unnecessary limitation on querying the event system.
   
   I previously provide a `size` field, with that as well as `time` field, pagination is unnecessary, also, pagination may break when, for example, records are inserted before the older page, this may happen when users imported events from an existing 3rd-party system whose




----------------------------------------------------------------
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:
users@infra.apache.org