You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wa...@apache.org on 2025/07/28 03:09:13 UTC
(skywalking-query-protocol) branch name-id created (now 504024e)
This is an automated email from the ASF dual-hosted git repository.
wankai pushed a change to branch name-id
in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git
at 504024e Support service/instance/endpoint name and layer instead of ID in query.
This branch includes the following new commits:
new 504024e Support service/instance/endpoint name and layer instead of ID in query.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(skywalking-query-protocol) 01/01: Support service/instance/endpoint name and layer instead of ID in query.
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wankai pushed a commit to branch name-id
in repository https://gitbox.apache.org/repos/asf/skywalking-query-protocol.git
commit 504024ef962b7019d97328b65abd5262f022fcbc
Author: wankai123 <wa...@foxmail.com>
AuthorDate: Mon Jul 28 11:08:58 2025 +0800
Support service/instance/endpoint name and layer instead of ID in query.
---
common.graphqls | 29 +++++++++++++++++++++++++++++
log.graphqls | 27 +++++++++++++++++++++++++++
metadata-v2.graphqls | 7 ++++++-
topology.graphqls | 5 +++++
trace.graphqls | 4 ++++
5 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/common.graphqls b/common.graphqls
index 9eebdbb..19b80ed 100644
--- a/common.graphqls
+++ b/common.graphqls
@@ -150,6 +150,35 @@ type DebuggingTrace {
spans: [DebuggingSpan!]!
}
+# The condition used for instead of serviceId in query.
+# If you have service name, you don't need to provide serviceId.
+input ServiceCondition {
+ serviceName: String!
+ # If the service is virtual then required, such the `layer` is `VIRTUAL_DATABASE/VIRTUAL_MQ/VIRTUAL_GATEWAY`.
+ # Otherwise, it is not required.
+ layer: String
+}
+
+# The condition used for instead of serviceInstanceId in query.
+# If you have service name and instance name, you don't need to provide serviceInstanceId.
+input InstanceCondition {
+ serviceName: String!
+ instanceName: String!
+ # If the service is virtual then required, such the `layer` is `VIRTUAL_DATABASE/VIRTUAL_MQ/VIRTUAL_GATEWAY`.
+ # Otherwise, it is not required.
+ layer: String
+}
+
+# The condition used for instead of endpointId in query.
+# If you have service name and endpoint name, you don't need to provide endpointId.
+input EndpointCondition {
+ serviceName: String!
+ endpointName: String!
+ # If the service is virtual then required, such the `layer` is `VIRTUAL_DATABASE/VIRTUAL_MQ/VIRTUAL_GATEWAY`.
+ # Otherwise, it is not required.
+ layer: String
+}
+
extend type Query {
# Query Health Checker module for the status of OAP server
checkHealth: HealthStatus!
diff --git a/log.graphqls b/log.graphqls
index b16474a..b7f1b7b 100644
--- a/log.graphqls
+++ b/log.graphqls
@@ -44,6 +44,33 @@ input LogQueryCondition {
serviceId: ID
serviceInstanceId: ID
endpointId: ID
+ # Can instead of serviceId, if both are provided, the "serviceId" will be used.
+ service: ServiceCondition
+ # Can instead of serviceInstanceId, if both are provided, the "serviceInstanceId" will be used.
+ instance: InstanceCondition
+ # Can instead of endpointId, if both are provided, the "endpointId" will be used.
+ endpoint: EndpointCondition
+ # Related trace condition.
+ # When use related trace condition, duration is not required.
+ relatedTrace: TraceScopeCondition
+ # The time range of log happened
+ # [Required] duration is required in most query, only exception is when use relatedTrace.
+ queryDuration: Duration
+ paging: Pagination!
+ tags: [LogTag!]
+ # Fuzzy query conditions for the log content.
+ # Use these 2 keyword related condition, when supportQueryLogsByKeywords returns TRUE.
+ keywordsOfContent: [String!]
+ excludingKeywordsOfContent: [String!]
+ # Order by timestamp, default desc
+ queryOrder: Order
+}
+
+input LogQueryConditionByName {
+ # The value of 0 means all services.
+ service: ServiceCondition
+ instance: InstanceCondition
+ endpoint: EndpointCondition
# Related trace condition.
# When use related trace condition, duration is not required.
relatedTrace: TraceScopeCondition
diff --git a/metadata-v2.graphqls b/metadata-v2.graphqls
index 2723515..f5a4866 100644
--- a/metadata-v2.graphqls
+++ b/metadata-v2.graphqls
@@ -150,17 +150,22 @@ extend type Query {
# Read service instance list.
listInstances(duration: Duration!, serviceId: ID!): [ServiceInstance!]!
+ listInstancesByName(duration: Duration!, service: ServiceCondition!): [ServiceInstance!]!
# Search and find service instance according to given ID. Return null if not existing.
getInstance(instanceId: String!): ServiceInstance
-
+ getInstanceByName(service: ServiceCondition!): ServiceInstance
+
# Search and find matched endpoints according to given service and keyword(optional)
# If no keyword, randomly choose endpoint based on `limit` value.
# If duration is nil mean get all endpoints, otherwise, get the endpoint list in the given duration.
findEndpoint(keyword: String, serviceId: ID!, limit: Int!, duration: Duration): [Endpoint!]!
+ findEndpointByName(keyword: String, service: ServiceCondition!, limit: Int!, duration: Duration): [Endpoint!]!
getEndpointInfo(endpointId: ID!): EndpointInfo
+ getEndpointInfoByName(endpoint: EndpointCondition!): EndpointInfo
# Read process list.
listProcesses(duration: Duration!, instanceId: ID!): [Process!]!
+ listProcessesByName(duration: Duration!, instance: InstanceCondition!): [Process!]!
# Find process according to given ID. Return null if not existing.
getProcess(processId: ID!): Process
# Get the number of matched processes through serviceId, labels
diff --git a/topology.graphqls b/topology.graphqls
index 0bb68b9..1d61049 100644
--- a/topology.graphqls
+++ b/topology.graphqls
@@ -134,15 +134,20 @@ extend type Query {
getGlobalTopology(duration: Duration!, layer: String, debug: Boolean): Topology
# Query the topology, based on the given service
getServiceTopology(serviceId: ID!, duration: Duration!, debug: Boolean): Topology
+ getServiceTopologyByName(service: ServiceCondition!, duration: Duration!, debug: Boolean): Topology
# Query the topology, based on the given services.
# `#getServiceTopology` could be replaced by this.
getServicesTopology(serviceIds: [ID!]!, duration: Duration!, debug: Boolean): Topology
+ getServicesTopologyByNames(services: [ServiceCondition!]!, duration: Duration!, debug: Boolean): Topology
# Query the instance topology, based on the given clientServiceId and serverServiceId
getServiceInstanceTopology(clientServiceId: ID!, serverServiceId: ID!, duration: Duration!, debug: Boolean): ServiceInstanceTopology
+ getServiceInstanceTopologyByName(clientService: ServiceCondition!, serverService: ServiceCondition!, duration: Duration!, debug: Boolean): ServiceInstanceTopology
# Query the topology, based on the given endpoint
getEndpointTopology(endpointId: ID!, duration: Duration!): Topology
# v2 of getEndpointTopology
getEndpointDependencies(endpointId: ID!, duration: Duration!, debug: Boolean): EndpointTopology
+ getEndpointDependenciesByName(endpoint: EndpointCondition!, duration: Duration!, debug: Boolean): EndpointTopology
# Query the topology, based on the given instance
getProcessTopology(serviceInstanceId: ID!, duration: Duration!, debug: Boolean): ProcessTopology
+ getProcessTopologyByName(instance: InstanceCondition!, duration: Duration!, debug: Boolean): ProcessTopology
}
diff --git a/trace.graphqls b/trace.graphqls
index b770345..d44d02b 100644
--- a/trace.graphqls
+++ b/trace.graphqls
@@ -36,6 +36,10 @@ input TraceQueryCondition {
# The value of 0 means all services.
serviceId: ID
serviceInstanceId: ID
+ # Can instead of serviceId, if both are provided, the "serviceId" will be used.
+ service: ServiceCondition
+ # Can instead of serviceInstanceId, if both are provided, the "serviceInstanceId" will be used.
+ instance: InstanceCondition
traceId: String
endpointId: ID
# The time range of traces started