diff --git a/apm-network/src/main/proto/ApplicationRegisterService.proto b/apm-network/src/main/proto/ApplicationRegisterService.proto new file mode 100644 index 000000000..702cde9fd --- /dev/null +++ b/apm-network/src/main/proto/ApplicationRegisterService.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "org.skywalking.apm.network.trace.proto"; + +import "KeyValue.proto"; + +//register service for ApplicationCode, this service is called when service starts. +service ApplicationRegisterService { + rpc register (Application) returns (ApplicationMapping) { + } +} + +message Application { + repeated string applicationCode = 1; +} + +message ApplicationMapping { + repeated KeyValue application = 1; +} \ No newline at end of file diff --git a/apm-network/src/main/proto/DiscoveryService.proto b/apm-network/src/main/proto/DiscoveryService.proto index e9a986bbe..1f22a0df3 100644 --- a/apm-network/src/main/proto/DiscoveryService.proto +++ b/apm-network/src/main/proto/DiscoveryService.proto @@ -16,7 +16,7 @@ service InstanceDiscoveryService { } message ApplicationInstance { - string applicationCode = 1; + int32 applicationId = 1; } message ApplicationInstanceMapping { @@ -45,6 +45,6 @@ message ServiceNameMappingElement { message ServiceNameElement { string serviceName = 1; - string ApplicationCode = 2; + int32 applicationId = 2; } diff --git a/apm-network/src/main/proto/KeyValue.proto b/apm-network/src/main/proto/KeyValue.proto new file mode 100644 index 000000000..f03132a38 --- /dev/null +++ b/apm-network/src/main/proto/KeyValue.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "org.skywalking.apm.network.collecor.proto"; + +message KeyValue { + string key = 1; + string value = 2; +} diff --git a/apm-network/src/main/proto/TraceSegmentService.proto b/apm-network/src/main/proto/TraceSegmentService.proto index 2134ff219..471cac5a5 100644 --- a/apm-network/src/main/proto/TraceSegmentService.proto +++ b/apm-network/src/main/proto/TraceSegmentService.proto @@ -4,6 +4,7 @@ option java_multiple_files = true; option java_package = "org.skywalking.apm.network.trace.proto"; import "Downstream.proto"; +import "KeyValue.proto"; service TraceSegmentService { rpc collect (stream UpstreamSegment) returns (Downstream) { @@ -65,11 +66,6 @@ enum SpanLayer { MQ = 3; } -message KeyValue { - string key = 1; - string value = 2; -} - message LogMessage { int64 time = 1; repeated KeyValue data = 2;