blob: 0b76f376ae37621152c8fe4af07ad1348f5e18de [file] [log] [blame]
# 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.
# The list of logs
type Logs {
logs: [Log!]!
total: Int!
}
# Log info
type Log {
serviceName: String
serviceId: ID
serviceInstanceName: String
serviceInstanceId: ID
endpointName: String
endpointId: ID
traceId: String
timestamp: Long!
contentType: ContentType!
content: String
tags: [KeyValue!]
}
# Represent the conditions used for query logs
input LogQueryCondition {
# The value of 0 means all services.
serviceId: ID
serviceInstanceId: ID
endpointId: ID
endpointName: String
# 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
}
# Trace related condition
input TraceScopeCondition {
traceId: String!
segmentId: String
spanId: Int
}
input LogTag {
key: String!
value: String
}
enum ContentType {
TEXT
JSON
YAML
}
extend type Query {
# Return true if the current storage implementation supports fuzzy query for logs.
supportQueryLogsByKeywords: Boolean!
queryLogs(condition: LogQueryCondition): Logs
}