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 2020/12/01 02:31:07 UTC

[skywalking-data-collect-protocol] 01/01: Add logging collect protocol

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

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

commit 821fc0110d47be321615f7ee0c0fc4fa5575ac9c
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Tue Dec 1 10:30:57 2020 +0800

    Add logging collect protocol
---
 logging/Logging.proto | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/logging/Logging.proto b/logging/Logging.proto
new file mode 100644
index 0000000..595b268
--- /dev/null
+++ b/logging/Logging.proto
@@ -0,0 +1,79 @@
+/*
+ * 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";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.logging.v3";
+option csharp_namespace = "SkyWalking.NetworkProtocol.V3";
+option go_package = "skywalking/network/language/agent/v3";
+
+import "common/Common.proto";
+
+// Report collected logs into the OAP backend
+service LogReportService {
+    // Recommend to report log data in a stream mode.
+    // The service/instance/endpoint of the log could share the previous value if they are not set.
+    // Reporting the logs of same service in the batch mode could reduce the network cost.
+    rpc collect (stream LogData) returns (Commands) {
+    }
+}
+
+// Log data is collected through file scratcher of agent.
+// Natively, Satellite provides various ways to collect logs.
+message LogData {
+    // [Required] **Service**. Represents a set/group of workloads which provide the same behaviours for incoming requests.
+    //
+    // The logic name represents the service. This would show as a separate node in the topology.
+    // The metrics analyzed from the spans, would be aggregated for this entity as the service level.
+    //
+    // If this is not the first element of the streaming, use the previous not-null name as the service name.
+    string service = 1;
+    // [Optional] **Service Instance**. Each individual workload in the Service group is known as an instance. Like `pods` in Kubernetes, it
+    // doesn't need to be a single OS process, however, if you are using instrument agents, an instance is actually a real OS process.
+    //
+    // The logic name represents the service instance. This would show as a separate node in the instance relationship.
+    // The metrics analyzed from the spans, would be aggregated for this entity as the service instance level.
+    string serviceInstance = 2;
+    // [Optional] **Endpoint**. A path in a service for incoming requests, such as an HTTP URI path or a gRPC service class + method signature.
+    //
+    // The logic name represents the endpoint, which logs belong.
+    string endpoint = 3;
+    // [Required] The literal text of the logs.
+    string log = 4;
+    // [Optional] The format of [log = 4], default value is text.
+    LogFormat format = 5;
+    // [Optional] The available tags. OAP server could provide search/analysis capabilities base on these.
+    repeated KeyStringValuePair tags = 6;
+    // [Optional] A string id represents the whole trace.
+    string traceId = 7;
+    // [Optional] A unique id represents this segment. Other segments could use this id to reference as a child segment.
+    string traceSegmentId = 8;
+    // [Optional] The number id of the span. Should be unique in the whole segment.
+    // Starting at 0.
+    int32 spanId = 9;
+}
+
+// The format of log
+enum LogFormat {
+    Text = 0;
+    Json = 1;
+    Yaml = 2;
+}
+
+