-
Notifications
You must be signed in to change notification settings - Fork 67
/
log.graphqls
113 lines (101 loc) · 3.34 KB
/
log.graphqls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# 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 {
# When this field is not empty, frontend should display it in UI
errorReason: String
logs: [Log!]!
#For OAP internal query debugging
debuggingTrace: DebuggingTrace
}
# 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
# 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
}
input LogTestRequest {
# The log data of protocol https://github.com/apache/skywalking-data-collect-protocol/blob/e626ee04850703c220f64b642d2893fa65572943/logging/Logging.proto#41
# in JSON format
log: String!
dsl: String!
}
type LogTestResponse {
# The final log if it will be persisted, this can be empty if the log is dropped.
log: Log
# The metrics generated during the LAL when testing a LogTestRequest
metrics: [LogTestMetrics!]
}
# The metrics generated during the LAL when testing a LogTestRequest
type LogTestMetrics {
name: String!
tags: [KeyValue!]
value: Long!
timestamp: Long!
}
extend type Query {
# Return true if the current storage implementation supports fuzzy query for logs.
supportQueryLogsByKeywords: Boolean!
queryLogs(condition: LogQueryCondition, debug: Boolean): Logs
# Test the logs and get the results of the LAL output.
test(requests: LogTestRequest!): LogTestResponse!
queryLogTagAutocompleteKeys(duration: Duration!):[String!]
queryLogTagAutocompleteValues(tagKey: String! , duration: Duration!):[String!]
}