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 2018/11/19 03:09:39 UTC
[incubator-skywalking-data-collect-protocol] branch master updated:
Provide v2 trace protocol, with no new feature,
but make sure concept consistent.
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
The following commit(s) were added to refs/heads/master by this push:
new d00551a Provide v2 trace protocol, with no new feature, but make sure concept consistent.
d00551a is described below
commit d00551ab94001b227a3e8e5178cd827c4f63165e
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Nov 19 11:09:30 2018 +0800
Provide v2 trace protocol, with no new feature, but make sure concept consistent.
---
.../JVMMetricsService.proto => common/JVM.proto | 12 -----
.../trace-common.proto | 28 +++++++----
.../JVMMetric.proto | 14 +++---
.../trace.proto | 51 ++++++--------------
language-agent/JVMMetricsService.proto | 54 +---------------------
language-agent/TraceSegmentService.proto | 24 +---------
register/InstancePing.proto | 2 +-
register/Register.proto | 2 +-
8 files changed, 43 insertions(+), 144 deletions(-)
diff --git a/language-agent/JVMMetricsService.proto b/common/JVM.proto
similarity index 88%
copy from language-agent/JVMMetricsService.proto
copy to common/JVM.proto
index 4c50aaf..e3a82c1 100644
--- a/language-agent/JVMMetricsService.proto
+++ b/common/JVM.proto
@@ -22,18 +22,6 @@ option java_multiple_files = true;
option java_package = "org.apache.skywalking.apm.network.language.agent";
option csharp_namespace = "SkyWalking.NetworkProtocol";
-import "language-agent/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;
diff --git a/register/InstancePing.proto b/common/trace-common.proto
similarity index 68%
copy from register/InstancePing.proto
copy to common/trace-common.proto
index 3a332a6..b9bdb78 100644
--- a/register/InstancePing.proto
+++ b/common/trace-common.proto
@@ -19,18 +19,28 @@
syntax = "proto3";
option java_multiple_files = true;
-option java_package = "org.apache.skywalking.apm.network.register";
+option java_package = "org.apache.skywalking.apm.network.language.agent";
option csharp_namespace = "SkyWalking.NetworkProtocol";
-import "common/common.proto";
+message UpstreamSegment {
+ repeated UniqueId globalTraceIds = 1;
+ bytes segment = 2; // the byte array of TraceSegmentObject
+}
+
+message UniqueId {
+ repeated int64 idParts = 1;
+}
-service ServiceInstancePing {
- rpc doPing (ServiceInstancePingPkg) returns (Commands) {
- }
+enum RefType {
+ CrossProcess = 0;
+ CrossThread = 1;
}
-message ServiceInstancePingPkg {
- int32 serviceInstanceId = 1;
- int64 time = 2;
- string serviceInstanceUUID = 3;
+enum SpanLayer {
+ Unknown = 0;
+ Database = 1;
+ RPCFramework = 2;
+ Http = 3;
+ MQ = 4;
+ Cache = 5;
}
diff --git a/register/InstancePing.proto b/language-agent-v2/JVMMetric.proto
similarity index 76%
copy from register/InstancePing.proto
copy to language-agent-v2/JVMMetric.proto
index 3a332a6..e6353d8 100644
--- a/register/InstancePing.proto
+++ b/language-agent-v2/JVMMetric.proto
@@ -19,18 +19,18 @@
syntax = "proto3";
option java_multiple_files = true;
-option java_package = "org.apache.skywalking.apm.network.register";
+option java_package = "org.apache.skywalking.apm.network.language.agent.v2";
option csharp_namespace = "SkyWalking.NetworkProtocol";
import "common/common.proto";
+import "common/JVM.proto";
-service ServiceInstancePing {
- rpc doPing (ServiceInstancePingPkg) returns (Commands) {
+service JVMMetricReportService {
+ rpc collect (JVMMetrics) returns (Downstream) {
}
}
-message ServiceInstancePingPkg {
- int32 serviceInstanceId = 1;
- int64 time = 2;
- string serviceInstanceUUID = 3;
+message JVMMetricCollection {
+ repeated JVMMetric metrics = 1;
+ int32 serviceInstanceId = 2;
}
diff --git a/language-agent/TraceSegmentService.proto b/language-agent-v2/trace.proto
similarity index 68%
copy from language-agent/TraceSegmentService.proto
copy to language-agent-v2/trace.proto
index 283526c..37f607e 100644
--- a/language-agent/TraceSegmentService.proto
+++ b/language-agent-v2/trace.proto
@@ -19,32 +19,21 @@
syntax = "proto3";
option java_multiple_files = true;
-option java_package = "org.apache.skywalking.apm.network.language.agent";
+option java_package = "org.apache.skywalking.apm.network.language.agent.v2";
option csharp_namespace = "SkyWalking.NetworkProtocol";
-import "language-agent/Common.proto";
-import "language-agent/Downstream.proto";
-import "language-agent/KeyWithStringValue.proto";
+import "common/common.proto";
-service TraceSegmentService {
+service TraceSegmentReportService {
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;
+ int32 serviceId = 3;
+ int32 serviceInstanceId = 4;
bool isSizeLimited = 5;
}
@@ -52,14 +41,14 @@ message TraceSegmentReference {
RefType refType = 1;
UniqueId parentTraceSegmentId = 2;
int32 parentSpanId = 3;
- int32 parentApplicationInstanceId = 4;
+ int32 parentServiceInstanceId = 4;
string networkAddress = 5;
int32 networkAddressId = 6;
- int32 entryApplicationInstanceId = 7;
- string entryServiceName = 8;
- int32 entryServiceId = 9;
- string parentServiceName = 10;
- int32 parentServiceId = 11;
+ int32 entryServiceInstanceId = 7;
+ string entryEndpoint = 8;
+ int32 entryEndpointId = 9;
+ string parentEndpoint = 10;
+ int32 parentEndopintId = 11;
}
message SpanObject {
@@ -81,21 +70,7 @@ message SpanObject {
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 {
+message Log {
int64 time = 1;
- repeated KeyWithStringValue data = 2;
+ repeated KeyStringValuePair data = 2;
}
diff --git a/language-agent/JVMMetricsService.proto b/language-agent/JVMMetricsService.proto
index 4c50aaf..dfc62e9 100644
--- a/language-agent/JVMMetricsService.proto
+++ b/language-agent/JVMMetricsService.proto
@@ -23,61 +23,9 @@ option java_package = "org.apache.skywalking.apm.network.language.agent";
option csharp_namespace = "SkyWalking.NetworkProtocol";
import "language-agent/Downstream.proto";
+import "common/JVM.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/language-agent/TraceSegmentService.proto b/language-agent/TraceSegmentService.proto
index 283526c..fc17cb8 100644
--- a/language-agent/TraceSegmentService.proto
+++ b/language-agent/TraceSegmentService.proto
@@ -25,21 +25,13 @@ option csharp_namespace = "SkyWalking.NetworkProtocol";
import "language-agent/Common.proto";
import "language-agent/Downstream.proto";
import "language-agent/KeyWithStringValue.proto";
+import "common/trace-common.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;
@@ -81,20 +73,6 @@ message SpanObject {
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;
diff --git a/register/InstancePing.proto b/register/InstancePing.proto
index 3a332a6..3a8ffe1 100644
--- a/register/InstancePing.proto
+++ b/register/InstancePing.proto
@@ -19,7 +19,7 @@
syntax = "proto3";
option java_multiple_files = true;
-option java_package = "org.apache.skywalking.apm.network.register";
+option java_package = "org.apache.skywalking.apm.network.register.v2";
option csharp_namespace = "SkyWalking.NetworkProtocol";
import "common/common.proto";
diff --git a/register/Register.proto b/register/Register.proto
index 24c83d1..13a20fc 100644
--- a/register/Register.proto
+++ b/register/Register.proto
@@ -19,7 +19,7 @@
syntax = "proto3";
option java_multiple_files = true;
-option java_package = "org.apache.skywalking.apm.network.register";
+option java_package = "org.apache.skywalking.apm.network.register.v2";
option csharp_namespace = "SkyWalking.NetworkProtocol";
import "common/common.proto";