You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by wu...@apache.org on 2018/02/23 03:31:14 UTC

[incubator-skywalking-data-collect-protocol] branch master created (now ab524b5)

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

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


      at ab524b5  Init data collect protocol from SkyWalking 5.0.0-alpha develop branch.

This branch includes the following new commits:

     new ab524b5  Init data collect protocol from SkyWalking 5.0.0-alpha develop branch.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
wusheng@apache.org.

[incubator-skywalking-data-collect-protocol] 01/01: Init data collect protocol from SkyWalking 5.0.0-alpha develop branch.

Posted by wu...@apache.org.
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/incubator-skywalking-data-collect-protocol.git

commit ab524b59def9a6618486bd015dfb2ca7f0d80c13
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Feb 23 11:30:48 2018 +0800

    Init data collect protocol from SkyWalking 5.0.0-alpha develop branch.
---
 ApplicationRegisterService.proto    | 20 +++++++++
 Common.proto                        | 10 +++++
 DiscoveryService.proto              | 72 ++++++++++++++++++++++++++++++++
 Downstream.proto                    |  8 ++++
 JVMMetricsService.proto             | 64 +++++++++++++++++++++++++++++
 KeyWithIntegerValue.proto           |  9 ++++
 KeyWithStringValue.proto            |  9 ++++
 NetworkAddressRegisterService.proto | 19 +++++++++
 TraceSegmentService.proto           | 82 +++++++++++++++++++++++++++++++++++++
 9 files changed, 293 insertions(+)

diff --git a/ApplicationRegisterService.proto b/ApplicationRegisterService.proto
new file mode 100644
index 0000000..e5b4dee
--- /dev/null
+++ b/ApplicationRegisterService.proto
@@ -0,0 +1,20 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+import "KeyWithIntegerValue.proto";
+
+//register service for ApplicationCode, this service is called when service starts.
+service ApplicationRegisterService {
+    rpc applicationCodeRegister (Application) returns (ApplicationMapping) {
+    }
+}
+
+message Application {
+    string applicationCode = 1;
+}
+
+message ApplicationMapping {
+    KeyWithIntegerValue application = 1;
+}
diff --git a/Common.proto b/Common.proto
new file mode 100644
index 0000000..9142490
--- /dev/null
+++ b/Common.proto
@@ -0,0 +1,10 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+enum SpanType {
+    Entry = 0;
+    Exit = 1;
+    Local = 2;
+}
\ No newline at end of file
diff --git a/DiscoveryService.proto b/DiscoveryService.proto
new file mode 100644
index 0000000..c4c06ca
--- /dev/null
+++ b/DiscoveryService.proto
@@ -0,0 +1,72 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+import "Common.proto";
+import "Downstream.proto";
+
+service InstanceDiscoveryService {
+    rpc registerInstance (ApplicationInstance) returns (ApplicationInstanceMapping) {
+    }
+
+    rpc heartbeat (ApplicationInstanceHeartbeat) returns (Downstream) {
+    }
+
+}
+
+message ApplicationInstance {
+    int32 applicationId = 1;
+    string agentUUID = 2;
+    int64 registerTime = 3;
+    OSInfo osinfo = 4;
+}
+
+message ApplicationInstanceMapping {
+    int32 applicationId = 1;
+    int32 applicationInstanceId = 2;
+}
+
+message ApplicationInstanceRecover {
+    int32 applicationId = 1;
+    int32 applicationInstanceId = 2;
+    int64 registerTime = 3;
+    OSInfo osinfo = 4;
+}
+
+message ApplicationInstanceHeartbeat {
+    int32 applicationInstanceId = 1;
+    int64 heartbeatTime = 2;
+}
+
+message OSInfo {
+    string osName = 1;
+    string hostname = 2;
+    int32 processNo = 3;
+    repeated string ipv4s = 4;
+}
+
+//discovery service for ServiceName by Network address or application code
+service ServiceNameDiscoveryService {
+    rpc discovery (ServiceNameCollection) returns (ServiceNameMappingCollection) {
+    }
+}
+
+message ServiceNameCollection {
+    repeated ServiceNameElement elements = 1;
+}
+
+message ServiceNameMappingCollection {
+    repeated ServiceNameMappingElement elements = 1;
+}
+
+message ServiceNameMappingElement {
+    int32 serviceId = 1;
+    ServiceNameElement element = 2;
+}
+
+message ServiceNameElement {
+    string serviceName = 1;
+    int32 applicationId = 2;
+    SpanType srcSpanType = 3;
+}
diff --git a/Downstream.proto b/Downstream.proto
new file mode 100644
index 0000000..bf38d53
--- /dev/null
+++ b/Downstream.proto
@@ -0,0 +1,8 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+// nothing down stream from collector yet.
+message Downstream {
+}
diff --git a/JVMMetricsService.proto b/JVMMetricsService.proto
new file mode 100644
index 0000000..6e07434
--- /dev/null
+++ b/JVMMetricsService.proto
@@ -0,0 +1,64 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+import "Downstream.proto";
+
+service JVMMetricsService {
+    rpc collect (JVMMetrics) returns (Downstream) {
+    }
+}
+
+message JVMMetrics {
+    repeated JVMMetric metrics = 1;
+    int32 applicationInstanceId = 2;
+}
+
+message JVMMetric {
+    int64 time = 1;
+    CPU cpu = 2;
+    repeated Memory memory = 3;
+    repeated MemoryPool memoryPool = 4;
+    repeated GC gc = 5;
+}
+
+message CPU {
+    double usagePercent = 2;
+}
+
+message Memory {
+    bool isHeap = 1;
+    int64 init = 2;
+    int64 max = 3;
+    int64 used = 4;
+    int64 committed = 5;
+}
+
+message MemoryPool {
+    PoolType type = 1;
+    int64 init = 2;
+    int64 max = 3;
+    int64 used = 4;
+    int64 commited = 5;
+}
+
+enum PoolType {
+    CODE_CACHE_USAGE = 0;
+    NEWGEN_USAGE = 1;
+    OLDGEN_USAGE = 2;
+    SURVIVOR_USAGE = 3;
+    PERMGEN_USAGE = 4;
+    METASPACE_USAGE = 5;
+}
+
+message GC {
+    GCPhrase phrase = 1;
+    int64 count = 2;
+    int64 time = 3;
+}
+
+enum GCPhrase {
+    NEW = 0;
+    OLD = 1;
+}
diff --git a/KeyWithIntegerValue.proto b/KeyWithIntegerValue.proto
new file mode 100644
index 0000000..c01f498
--- /dev/null
+++ b/KeyWithIntegerValue.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+message KeyWithIntegerValue {
+    string key = 1;
+    int32 value = 2;
+}
diff --git a/KeyWithStringValue.proto b/KeyWithStringValue.proto
new file mode 100644
index 0000000..92cbd45
--- /dev/null
+++ b/KeyWithStringValue.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+message KeyWithStringValue {
+    string key = 1;
+    string value = 2;
+}
diff --git a/NetworkAddressRegisterService.proto b/NetworkAddressRegisterService.proto
new file mode 100644
index 0000000..15a6b31
--- /dev/null
+++ b/NetworkAddressRegisterService.proto
@@ -0,0 +1,19 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+import "KeyWithIntegerValue.proto";
+
+service NetworkAddressRegisterService {
+    rpc batchRegister (NetworkAddresses) returns (NetworkAddressMappings) {
+    }
+}
+
+message NetworkAddresses {
+    repeated string addresses = 1;
+}
+
+message NetworkAddressMappings {
+    repeated KeyWithIntegerValue addressIds = 1;
+}
diff --git a/TraceSegmentService.proto b/TraceSegmentService.proto
new file mode 100644
index 0000000..f58fbbf
--- /dev/null
+++ b/TraceSegmentService.proto
@@ -0,0 +1,82 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.apache.skywalking.apm.network.proto";
+
+import "Common.proto";
+import "Downstream.proto";
+import "KeyWithStringValue.proto";
+
+service TraceSegmentService {
+    rpc collect (stream UpstreamSegment) returns (Downstream) {
+    }
+}
+
+message UpstreamSegment {
+    repeated UniqueId globalTraceIds = 1;
+    bytes segment = 2; // the byte array of TraceSegmentObject
+}
+
+message UniqueId {
+    repeated int64 idParts = 1;
+}
+
+message TraceSegmentObject {
+    UniqueId traceSegmentId = 1;
+    repeated SpanObject spans = 2;
+    int32 applicationId = 3;
+    int32 applicationInstanceId = 4;
+    bool isSizeLimited = 5;
+}
+
+message TraceSegmentReference {
+    RefType refType = 1;
+    UniqueId parentTraceSegmentId = 2;
+    int32 parentSpanId = 3;
+    int32 parentApplicationInstanceId = 4;
+    string networkAddress = 5;
+    int32 networkAddressId = 6;
+    int32 entryApplicationInstanceId = 7;
+    string entryServiceName = 8;
+    int32 entryServiceId = 9;
+    string parentServiceName = 10;
+    int32 parentServiceId = 11;
+}
+
+message SpanObject {
+    int32 spanId = 1;
+    int32 parentSpanId = 2;
+    int64 startTime = 3;
+    int64 endTime = 4;
+    repeated TraceSegmentReference refs = 5;
+    int32 operationNameId = 6;
+    string operationName = 7;
+    int32 peerId = 8;
+    string peer = 9;
+    SpanType spanType = 10;
+    SpanLayer spanLayer = 11;
+    int32 componentId = 12;
+    string component = 13;
+    bool isError = 14;
+    repeated KeyWithStringValue tags = 15;
+    repeated LogMessage logs = 16;
+}
+
+enum RefType {
+    CrossProcess = 0;
+    CrossThread = 1;
+}
+
+enum SpanLayer {
+    Unknown = 0;
+    Database = 1;
+    RPCFramework = 2;
+    Http = 3;
+    MQ = 4;
+    Cache = 5;
+}
+
+message LogMessage {
+    int64 time = 1;
+    repeated KeyWithStringValue data = 2;
+}

-- 
To stop receiving notification emails like this one, please contact
wusheng@apache.org.