You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/11/22 13:57:35 UTC

[skywalking-data-collect-protocol] branch master updated: Add description of the Command (#79)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-data-collect-protocol.git


The following commit(s) were added to refs/heads/master by this push:
     new 78a7ba7  Add description of the Command (#79)
78a7ba7 is described below

commit 78a7ba74292694bfde4db76788f1a7612aecb99d
Author: mrproliu <74...@qq.com>
AuthorDate: Tue Nov 22 21:57:30 2022 +0800

    Add description of the Command (#79)
---
 browser/BrowserPerf.proto                          |  1 +
 browser/BrowserPerfCompat.proto                    |  1 +
 common/Command.proto                               | 92 ++++++++++++++++++++++
 common/Common.proto                                |  9 ---
 ebpf/profiling/Process.proto                       |  1 +
 ebpf/profiling/Profile.proto                       |  1 +
 event/Event.proto                                  |  1 +
 language-agent/CLRMetric.proto                     |  1 +
 language-agent/CLRMetricCompat.proto               |  1 +
 language-agent/ConfigurationDiscoveryService.proto |  1 +
 language-agent/JVMMetric.proto                     |  1 +
 language-agent/JVMMetricCompat.proto               |  1 +
 language-agent/Meter.proto                         |  1 +
 language-agent/MeterCompat.proto                   |  1 +
 language-agent/Tracing.proto                       |  1 +
 language-agent/TracingCompat.proto                 |  1 +
 logging/Logging.proto                              |  1 +
 management/Management.proto                        |  1 +
 management/ManagementCompat.proto                  |  1 +
 profile/Profile.proto                              |  1 +
 profile/ProfileCompat.proto                        |  1 +
 21 files changed, 111 insertions(+), 9 deletions(-)

diff --git a/browser/BrowserPerf.proto b/browser/BrowserPerf.proto
index c515b28..c337ca6 100644
--- a/browser/BrowserPerf.proto
+++ b/browser/BrowserPerf.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Collect performance raw data from browser.
 service BrowserPerfService {
diff --git a/browser/BrowserPerfCompat.proto b/browser/BrowserPerfCompat.proto
index 0676d09..9b32301 100644
--- a/browser/BrowserPerfCompat.proto
+++ b/browser/BrowserPerfCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3/
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "browser/BrowserPerf.proto";
 
 // Collect performance raw data from browser.
diff --git a/common/Command.proto b/common/Command.proto
new file mode 100644
index 0000000..c62c695
--- /dev/null
+++ b/common/Command.proto
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ *
+ */
+
+syntax = "proto3";
+
+package skywalking.v3;
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.common.v3";
+option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
+option go_package = "skywalking.apache.org/repo/goapi/collect/common/v3";
+
+import "common/Common.proto";
+
+// Command represents an protocol customized data when return.
+//
+// When the agent communicates with the OAP side using gRPC, the OAP uses Command to return the data content to the Agent.
+//
+// The available commands are,
+// Name: ConfigurationDiscoveryCommand
+// Args:
+//     SerialNumber: String
+//     UUID: String
+//     properties: Key-value pairs rely on agent-side implementations
+//
+// Ref, Java agent supported configurations, https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/configuration-discovery/
+//
+// Name: ProfileTaskQuery
+// Args:
+//     SerialNumber: String
+//     TaskId: String
+//     EndpointName: String
+//     Duration: Integer
+//     MinDurationThreshold: Integer
+//     DumpPeriod: Integer
+//     MaxSamplingCount: Integer
+//     StartTime: Date Timestamp
+//     CreateTime: Date Timestamp
+//
+// Name: EBPFProfilingTaskQuery
+// Args:
+//     TaskId: String
+//     ProcessId: Integer List
+//     TaskUpdateTime: Date timestamp
+//     TriggerType: Enum, value = FIXED_TIME
+//     TargetType: Enum, value = ON_CPU, OFF_CPU or NETWORK
+//     TaskStartTime: Date Timestamp
+//     ExtensionConfigJSON: JSON serialization of NetworkSamplings.
+//         --- NetworkSamplings ---
+//         NetworkSamplings: List
+//             URIRegex: String
+//             MinDuration: Integer
+//             When4xx: Boolean
+//             When5xx: Boolean
+//             Settings: Object
+//                 RequireCompleteRequest: Boolean
+//                 MaxRequestSize: Integer
+//                 RequireCompleteResponse: Boolean
+//                 MaxResponseSize: Integer
+//         ------------------------
+//     FixedTriggerDuration: Long
+message Command {
+    // Use command name to distinguish different data type.
+    string command = 1;
+    // Data content in command.
+    // The value of content needs to be serialized as string for transmission.
+    //
+    // Basic data type: convert as string.
+    // The list of basic data: multiple data are split by ",".
+    // Complex data: serialize string through json.
+    repeated KeyStringValuePair args = 2;
+}
+
+// Transferring multiple Command in agent and OAP.
+message Commands {
+    repeated Command commands = 1;
+}
diff --git a/common/Common.proto b/common/Common.proto
index 5df1d43..d54f7db 100644
--- a/common/Common.proto
+++ b/common/Common.proto
@@ -50,15 +50,6 @@ enum DetectPoint {
     proxy = 2;
 }
 
-message Commands {
-    repeated Command commands = 1;
-}
-
-message Command {
-    string command = 1;
-    repeated KeyStringValuePair args = 2;
-}
-
 // since v3.1
 // An instantaneous point on the time-line.
 // An instant represents a data point accurate to the nanosecond.
diff --git a/ebpf/profiling/Process.proto b/ebpf/profiling/Process.proto
index eac75a0..fc4d6a7 100644
--- a/ebpf/profiling/Process.proto
+++ b/ebpf/profiling/Process.proto
@@ -25,6 +25,7 @@ option java_package = "org.apache.skywalking.apm.network.ebpf.profiling.process.
 option go_package = "skywalking.apache.org/repo/goapi/collect/ebpf/profiling/process/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Define the detected processes and report them.
 service EBPFProcessService {
diff --git a/ebpf/profiling/Profile.proto b/ebpf/profiling/Profile.proto
index 311061b..c1b6149 100644
--- a/ebpf/profiling/Profile.proto
+++ b/ebpf/profiling/Profile.proto
@@ -25,6 +25,7 @@ option java_package = "org.apache.skywalking.apm.network.ebpf.profiling.v3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/ebpf/profiling/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Define the Rover Process profiling task and upload profiling data.
 service EBPFProfilingService {
diff --git a/event/Event.proto b/event/Event.proto
index f24a87e..7d9d665 100644
--- a/event/Event.proto
+++ b/event/Event.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/event/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 service EventService {
   // When reporting an event, you typically call the collect function twice, one for starting of the event and the other one for ending of the event, with the same UUID.
diff --git a/language-agent/CLRMetric.proto b/language-agent/CLRMetric.proto
index c751069..bffe720 100644
--- a/language-agent/CLRMetric.proto
+++ b/language-agent/CLRMetric.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 service CLRMetricReportService {
     rpc collect (CLRMetricCollection) returns (Commands) {
diff --git a/language-agent/CLRMetricCompat.proto b/language-agent/CLRMetricCompat.proto
index 466721a..e3a2811 100644
--- a/language-agent/CLRMetricCompat.proto
+++ b/language-agent/CLRMetricCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3/
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "language-agent/CLRMetric.proto";
 
 service CLRMetricReportService {
diff --git a/language-agent/ConfigurationDiscoveryService.proto b/language-agent/ConfigurationDiscoveryService.proto
index b2e9b10..305fb3e 100644
--- a/language-agent/ConfigurationDiscoveryService.proto
+++ b/language-agent/ConfigurationDiscoveryService.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/agent/configuration/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Fetch the latest dynamic configurations of the service.
 service ConfigurationDiscoveryService {
diff --git a/language-agent/JVMMetric.proto b/language-agent/JVMMetric.proto
index f092b5b..a4808f7 100644
--- a/language-agent/JVMMetric.proto
+++ b/language-agent/JVMMetric.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Define the JVM metrics report service.
 service JVMMetricReportService {
diff --git a/language-agent/JVMMetricCompat.proto b/language-agent/JVMMetricCompat.proto
index 4899479..df4366e 100644
--- a/language-agent/JVMMetricCompat.proto
+++ b/language-agent/JVMMetricCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3/
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "language-agent/JVMMetric.proto";
 
 // Define the JVM metrics report service.
diff --git a/language-agent/Meter.proto b/language-agent/Meter.proto
index b74580e..0a71e1f 100644
--- a/language-agent/Meter.proto
+++ b/language-agent/Meter.proto
@@ -25,6 +25,7 @@ option java_package = "org.apache.skywalking.apm.network.language.agent.v3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 service MeterReportService {
     // Meter data is reported in a certain period. The agent/SDK should report all collected metrics in this period through one stream.
diff --git a/language-agent/MeterCompat.proto b/language-agent/MeterCompat.proto
index 263fa62..fdb4e7b 100644
--- a/language-agent/MeterCompat.proto
+++ b/language-agent/MeterCompat.proto
@@ -25,6 +25,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3.Compat";
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "language-agent/Meter.proto";
 
 service MeterReportService {
diff --git a/language-agent/Tracing.proto b/language-agent/Tracing.proto
index 53dfbe6..2e362b8 100644
--- a/language-agent/Tracing.proto
+++ b/language-agent/Tracing.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Define a trace segment report service.
 // All language agents or any trace collecting component, could use this service to send span collection to the SkyWalking OAP backend.
diff --git a/language-agent/TracingCompat.proto b/language-agent/TracingCompat.proto
index 18b7a04..f9ec2e6 100644
--- a/language-agent/TracingCompat.proto
+++ b/language-agent/TracingCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/language/agent/v3/
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "language-agent/Tracing.proto";
 
 // Define a trace segment report service.
diff --git a/logging/Logging.proto b/logging/Logging.proto
index 654dddd..96063df 100644
--- a/logging/Logging.proto
+++ b/logging/Logging.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/logging/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Report collected logs into the OAP backend
 service LogReportService {
diff --git a/management/Management.proto b/management/Management.proto
index 2d817b3..ddd54c9 100644
--- a/management/Management.proto
+++ b/management/Management.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/management/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 // Define the service reporting the extra information of the instance.
 service ManagementService {
diff --git a/management/ManagementCompat.proto b/management/ManagementCompat.proto
index a04f4b3..219c9f4 100644
--- a/management/ManagementCompat.proto
+++ b/management/ManagementCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/management/v3/comp
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "management/Management.proto";
 
 // Define the service reporting the extra information of the instance.
diff --git a/profile/Profile.proto b/profile/Profile.proto
index d1107fa..e17f1e5 100644
--- a/profile/Profile.proto
+++ b/profile/Profile.proto
@@ -26,6 +26,7 @@ option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
 option go_package = "skywalking.apache.org/repo/goapi/collect/language/profile/v3";
 
 import "common/Common.proto";
+import "common/Command.proto";
 
 service ProfileTask {
 
diff --git a/profile/ProfileCompat.proto b/profile/ProfileCompat.proto
index 0367250..119a521 100644
--- a/profile/ProfileCompat.proto
+++ b/profile/ProfileCompat.proto
@@ -25,6 +25,7 @@ option go_package = "skywalking.apache.org/repo/goapi/collect/language/profile/v
 option deprecated = true;
 
 import "common/Common.proto";
+import "common/Command.proto";
 import "profile/Profile.proto";
 
 service ProfileTask {