lujiajing1126 commented on code in PR #139: URL: https://github.com/apache/skywalking-query-protocol/pull/139#discussion_r1808018120
########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed + successInstanceIds: [ID] +} + +# Define the log of a task executed by an instance +type AsyncProfilerTaskLog { + # The task id + id: String! + # Instance of executing task + instanceId: ID! + instanceName: String! + + operationType: AsyncProfilerTaskLogOperationType! + operationTime: Long! +} + +# Define the execution progress of the task +enum AsyncProfilerTaskLogOperationType { + # When sniffer has notified Review Comment: ```suggestion # NOTIFIED means the task has been issued to the Java Agent ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure Review Comment: ```suggestion # id is the identity of the stack element ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node Review Comment: ```suggestion # The sampling number of the current tree node, excluding samples of the children ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed + successInstanceIds: [ID] +} + +# Define the log of a task executed by an instance +type AsyncProfilerTaskLog { + # The task id + id: String! + # Instance of executing task + instanceId: ID! + instanceName: String! + + operationType: AsyncProfilerTaskLogOperationType! + operationTime: Long! +} + +# Define the execution progress of the task +enum AsyncProfilerTaskLogOperationType { + # When sniffer has notified + NOTIFIED, + # When sniffer has execution finished to report + EXECUTION_FINISHED + # When the sniffer completes the task but the jfr file is too large for the oap server to receive + JFR_UPLOAD_FILE_TOO_LARGE_ERROR + # When the sniffer cannot execute its task Review Comment: ```suggestion # EXECUTION_TASK_ERROR means potential execution error caused by the Java Agent ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed Review Comment: ```suggestion # errorInstanceIds gives instances that failed to execute the task ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed + successInstanceIds: [ID] +} + +# Define the log of a task executed by an instance +type AsyncProfilerTaskLog { + # The task id + id: String! + # Instance of executing task + instanceId: ID! + instanceName: String! + + operationType: AsyncProfilerTaskLogOperationType! + operationTime: Long! +} + +# Define the execution progress of the task +enum AsyncProfilerTaskLogOperationType { + # When sniffer has notified + NOTIFIED, + # When sniffer has execution finished to report + EXECUTION_FINISHED + # When the sniffer completes the task but the jfr file is too large for the oap server to receive Review Comment: ```suggestion # JFR_UPLOAD_FILE_TOO_LARGE_ERROR means the Java Agent has finished the task but the target file is too large to be received by the OAP server ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service Review Comment: ```suggestion # tasks is a list of async profiling tasks belonging to the specific service ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed + successInstanceIds: [ID] +} + +# Define the log of a task executed by an instance +type AsyncProfilerTaskLog { + # The task id + id: String! + # Instance of executing task + instanceId: ID! + instanceName: String! + + operationType: AsyncProfilerTaskLogOperationType! + operationTime: Long! +} + +# Define the execution progress of the task +enum AsyncProfilerTaskLogOperationType { + # When sniffer has notified + NOTIFIED, + # When sniffer has execution finished to report Review Comment: ```suggestion # EXECUTION_FINISHED means the Java Agent has finished the execution ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed + successInstanceIds: [ID] +} + +# Define the log of a task executed by an instance +type AsyncProfilerTaskLog { + # The task id + id: String! + # Instance of executing task Review Comment: ```suggestion # instanceId is the id of the instance which reported this task log ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task Review Comment: ```suggestion # All task execution logs of the current task ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! Review Comment: ```suggestion # parentId is the identity of the parent stack element. Stack elements are organized as a tree. parentId: ID! ``` ########## async-profiler.graphqls: ########## @@ -0,0 +1,188 @@ +# 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. + +# Request to create a async-profiler task +input AsyncProfilerTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task (second) + duration: Int! + # Define which event types this task needs to collect. You can choose cpu and alloc... + events: [AsyncProfilerEventType!]! + # other async-profiler execute options, e.g. alloc=2k,lock=2s + execArgs: String +} + +# AsyncProfiler task creation result +type AsyncProfilerTaskCreationResult { + # Code represents success or failure. If successful, it returns the task id, otherwise it returns the error reason + code: AsyncProfilerTaskCreationType! + # ErrorCode means if code indicates an error, then the detailed reason for the exception is returned. + errorReason: String + # Task id + id: String +} + +# AsyncProfiler task creation type +enum AsyncProfilerTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a async-profiler task executing + ALREADY_PROFILING_ERROR +} + +# Request to query async-profiler task list +input AsyncProfilerTaskListRequest { + # Define the task list under which service is obtained + serviceId: ID! + # Start time + startTime: Long + # End time + endTime: Long + # The most recent limit number of tasks + limit: Int +} + +# Request to query flame graph analyzation +input AsyncProfilerAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # Define which service instances generate data for analysis + instanceIds: [String!]! + # JFR event type + eventType: JFREventType! +} + +# Define async-profiler task list result +type AsyncProfilerTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Get the task array under the current service + tasks: [AsyncProfilerTask!] +} + +# Define async-profiler task data +# The fields definition is the same as AsyncProfilerTaskCreationRequest +type AsyncProfilerTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: [AsyncProfilerEventType!]! + duration: Int! + execArgs: String +} + +# Define the flame graph results produced by async-profiler +type AsyncProfilerStackTree { + type: JFREventType! + elements: [AsyncProfilerStackElement!] +} + +# Define the thread stack analyze tree element +type AsyncProfilerStackElement { + # Id and parentId are used in graphql protocol to display tree structure + id: ID! + parentId: ID! + # Method signatures in tree nodes + codeSignature: String! + # The total number of samples of the current tree node, including child nodes + total: Long! + # The sampling number of the current tree node, only the current node + self: Long! +} + +# Define the analysis results of the task +type AsyncProfilerAnalyzation { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + # Displaying the tree structure data required for the flame graph + tree: AsyncProfilerStackTree +} + +# Defines task progress, including task logs, success and failure instances +type AsyncProfilerTaskProgress { + # All task execution logs under the current task + logs: [AsyncProfilerTaskLog!] + # Instances where task execution failed + errorInstanceIds: [ID] + # Instances where task execution failed Review Comment: ```suggestion # successInstanceIds gives instances that have executed the task successfully ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
