mrproliu commented on code in PR #152: URL: https://github.com/apache/skywalking-query-protocol/pull/152#discussion_r2361799865
########## pprof.graphqls: ########## @@ -0,0 +1,174 @@ +# 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 pprof task +input PprofTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task + duration: Int! Review Comment: Following the agent implementation, do all event types require a duration? Also, please add the unit in the comment. ########## pprof.graphqls: ########## @@ -0,0 +1,174 @@ +# 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 pprof task +input PprofTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task + duration: Int! + # Define which event types this task needs to collect. + events: PprofEventType! + # Define the period of the pprof dump + dumpPeriod: Int! Review Comment: Dump Period is also not all the event types required? ########## pprof.graphqls: ########## @@ -0,0 +1,174 @@ +# 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 pprof task +input PprofTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! Review Comment: Why does this task need an instance ID list? The instances are usually unnamed. ########## pprof.graphqls: ########## @@ -0,0 +1,174 @@ +# 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 pprof task +input PprofTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task + duration: Int! + # Define which event types this task needs to collect. + events: PprofEventType! + # Define the period of the pprof dump + dumpPeriod: Int! +} + +# PprofTaskCreationResult is the result of the task creation request +type PprofTaskCreationResult { + # Code defines the status of the response, i.e. success or failure. + code: PprofTaskCreationType! + # ErrorReason gives detailed reason for the exception, if the code returned represents a kind of failure. + errorReason: String + # Task id, if code is SUCCESS. + id: String +} + +# Pprof task creation type +enum PprofTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a pprof task executing + ALREADY_PROFILING_ERROR +} + +# Request to query pprof task list +input PprofTaskListRequest { + # ServiceId associated with the task + serviceId: ID! + # Time Range + queryDuration: Duration + # Limit defines the number of the tasks to be returned. + limit: Int +} + +# Request to query flame graph analyzation +input PprofAnalyzationRequest { + # Define which task to analyze + taskId: ID! Review Comment: Can we generate a new ID that combines the task ID and instance ID? ########## pprof.graphqls: ########## @@ -0,0 +1,174 @@ +# 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 pprof task +input PprofTaskCreationRequest { + # Define the service to execute the task + serviceId: ID! + # Define which instances need to execute tasks + serviceInstanceIds: [String!]! + # Define the duration of this task + duration: Int! + # Define which event types this task needs to collect. + events: PprofEventType! + # Define the period of the pprof dump + dumpPeriod: Int! +} + +# PprofTaskCreationResult is the result of the task creation request +type PprofTaskCreationResult { + # Code defines the status of the response, i.e. success or failure. + code: PprofTaskCreationType! + # ErrorReason gives detailed reason for the exception, if the code returned represents a kind of failure. + errorReason: String + # Task id, if code is SUCCESS. + id: String +} + +# Pprof task creation type +enum PprofTaskCreationType { + # Task created successfully + SUCCESS + # Task creation failed due to argument errors + ARGUMENT_ERROR + # The current service already has a pprof task executing + ALREADY_PROFILING_ERROR +} + +# Request to query pprof task list +input PprofTaskListRequest { + # ServiceId associated with the task + serviceId: ID! + # Time Range + queryDuration: Duration + # Limit defines the number of the tasks to be returned. + limit: Int +} + +# Request to query flame graph analyzation +input PprofAnalyzationRequest { + # Define which task to analyze + taskId: ID! + # InstanceIds defines the instances to be included for analysis + instanceIds: [String!]! +} + +# Define pprof task list result +type PprofTaskListResult { + # If it is null or empty, it means the task is created successfully, otherwise it gets the creation error reason + errorReason: String + + # Tasks is a list of pprof tasks belonging to the specific service + tasks: [PprofTask!] +} + +# Define pprof task data +# The fields definition is the same as PprofTaskCreationRequest +type PprofTask { + id: String! + serviceId: String! + serviceInstanceIds: [String!]! + createTime: Long! + events: PprofEventType! + duration: Int! + dumpPeriod: Int! Review Comment: Same as the create request, it can be blank. -- 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]
