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/12/09 06:33:07 UTC

[GitHub] [skywalking-query-protocol] wu-sheng opened a new pull request #63: Introduce SkyWalking v9 core query protocol.

wu-sheng opened a new pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63


   I have added descriptions in the comments, please take a look. 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] wu-sheng commented on pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#issuecomment-989577817


   I think we don't have layer on the top of layer for now.
   
   Current infrastructure map should be inside one layer. Group -> Service -> Instance. Is this working for you?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] Fine0830 commented on a change in pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on a change in pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#discussion_r765472563



##########
File path: metadata-v2.graphqls
##########
@@ -0,0 +1,108 @@
+# 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.
+
+# Metadata query v2 protocol provides the layer-based query to various services monitored by SkyWalking ecosystem.
+# It would adopt multiple-layer modern cloud native infrastructure.
+# In the v9 core, v1 protocol is provided on the top of the v2 implementation.
+# The v1's services, Databases, Browsers are all services with layer=general, layer=database, layer=browser.
+# Each service would have native definition about instance and endpoint.
+
+# Service is a logic concept, representing a collection of runnable context.
+type Service {
+    id: ID!
+    name: String!
+    # The custom/logi group of the service
+    group: String!
+    # Layer represents an abstract framework in the computer science, such as operation system(VM layer), Kubernetes(k8s layer),
+    # Service Mesh(typical Istio+Envoy layer).
+    # The name of layer is a string, but we would reserve some for visualization(UI)
+    # - os-linux
+    # - k8s
+    # - general(agent-installed)
+    # - faas
+    # - mesh
+    # - mesh-cp
+    # - mesh-dp
+    # - database
+    # - cache
+    # - browser
+    #
+    # UI uses this literal string names to provide various layout for their services with metrics.
+    layer: String!
+}
+
+# The minimal runnable unit in the service. It provides consistent and fundamental capabilities in physical perspective.
+# A service, as a logic unit, have multiple instances in the runtime.
+# Such as, an OS-level processor, a pod in k8s, a running function in the FAAS engine.
+type ServiceInstance {
+    id: ID!
+    name: String!
+    attributes: [Attribute!]!
+    language: Language!
+    instanceUUID: String!
+}
+
+type Attribute {
+    name: String!
+    value: String!
+}
+
+# The endpoint is the minimal functional unit.
+# Typically, it presents a URI or gRPC service name in the service.
+# Different from instance, this is a logical functional unit.
+type Endpoint {
+    id: ID!
+    name: String!
+}
+
+type EndpointInfo {
+    id: ID!
+    name: String!
+    serviceId: ID!
+    serviceName: String!
+}
+
+type Database {
+    id: ID!
+    name: String!
+    type: String!
+}
+
+type TimeInfo {
+  # server current timezone, format: +0800
+  timezone: String
+  # server current timestamp, format: 1569124528392
+  currentTimestamp: Long
+}
+
+extend type Query {
+    # Read the service list according to layer.
+    listServices(layer: String!): [Service!]!
+    # Read service instance list.
+    listInstances(duration: Duration!, serviceId: ID!): [ServiceInstance!]!
+
+    # Search and find service according to given ID. Return null if not existing.
+    findService(serviceId: String!): Service
+    # Search and find service instance according to given ID. Return null if not existing.
+    findInstance(endpointId: String!): ServiceInstance

Review comment:
       `endpointId` should be `instanceId` ?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] wu-sheng commented on a change in pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#discussion_r765475849



##########
File path: metadata-v2.graphqls
##########
@@ -0,0 +1,108 @@
+# 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.
+
+# Metadata query v2 protocol provides the layer-based query to various services monitored by SkyWalking ecosystem.
+# It would adopt multiple-layer modern cloud native infrastructure.
+# In the v9 core, v1 protocol is provided on the top of the v2 implementation.
+# The v1's services, Databases, Browsers are all services with layer=general, layer=database, layer=browser.
+# Each service would have native definition about instance and endpoint.
+
+# Service is a logic concept, representing a collection of runnable context.
+type Service {
+    id: ID!
+    name: String!
+    # The custom/logi group of the service
+    group: String!
+    # Layer represents an abstract framework in the computer science, such as operation system(VM layer), Kubernetes(k8s layer),
+    # Service Mesh(typical Istio+Envoy layer).
+    # The name of layer is a string, but we would reserve some for visualization(UI)
+    # - os-linux
+    # - k8s
+    # - general(agent-installed)
+    # - faas
+    # - mesh
+    # - mesh-cp
+    # - mesh-dp
+    # - database
+    # - cache
+    # - browser
+    #
+    # UI uses this literal string names to provide various layout for their services with metrics.
+    layer: String!
+}
+
+# The minimal runnable unit in the service. It provides consistent and fundamental capabilities in physical perspective.
+# A service, as a logic unit, have multiple instances in the runtime.
+# Such as, an OS-level processor, a pod in k8s, a running function in the FAAS engine.
+type ServiceInstance {
+    id: ID!
+    name: String!
+    attributes: [Attribute!]!
+    language: Language!
+    instanceUUID: String!
+}
+
+type Attribute {
+    name: String!
+    value: String!
+}
+
+# The endpoint is the minimal functional unit.
+# Typically, it presents a URI or gRPC service name in the service.
+# Different from instance, this is a logical functional unit.
+type Endpoint {
+    id: ID!
+    name: String!
+}
+
+type EndpointInfo {
+    id: ID!
+    name: String!
+    serviceId: ID!
+    serviceName: String!
+}
+
+type Database {
+    id: ID!
+    name: String!
+    type: String!
+}
+
+type TimeInfo {
+  # server current timezone, format: +0800
+  timezone: String
+  # server current timestamp, format: 1569124528392
+  currentTimestamp: Long
+}
+
+extend type Query {
+    # Read the service list according to layer.
+    listServices(layer: String!): [Service!]!
+    # Read service instance list.
+    listInstances(duration: Duration!, serviceId: ID!): [ServiceInstance!]!
+
+    # Search and find service according to given ID. Return null if not existing.
+    findService(serviceId: String!): Service
+    # Search and find service instance according to given ID. Return null if not existing.
+    findInstance(endpointId: String!): ServiceInstance

Review comment:
       Yes




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] Fine0830 commented on pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#issuecomment-989575649


   One question: can we add `listLayers` for infrastructure map. 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] wu-sheng merged pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] wu-sheng commented on pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#issuecomment-989868832


   > Hi sorry for late, just one question: is this v9 query protocol compatible with previous one? It looks that you want to be compatible as much as possible but there are some deleted fields, which should be breaking changes I think?
   
   There are just grammar level compatible, and provide limited features. Such as grouping based query is replaced by layer based query.
   Could you share which specific one do you have concern?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-query-protocol] Fine0830 commented on pull request #63: Introduce SkyWalking v9 core query protocol.

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #63:
URL: https://github.com/apache/skywalking-query-protocol/pull/63#issuecomment-989581002


   > 
   
   Yes, it's fine. I forgot we added sub-menus for infrastructure.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org