From 0f0b5a02d777482e0011b3bc7276d410ee643ae8 Mon Sep 17 00:00:00 2001 From: Julien Fontaine Date: Thu, 20 Aug 2020 17:51:17 -0400 Subject: [PATCH] Add request IDs in command-executor log * Update gRPC interface to handle SubRequestID and Originator ID * Update command-executor log format to handle request IDs in the log statement * Add SubRequest ID and Originator ID in BP log statement Issue-ID: CCSDK-2687 Change-Id: If261bb0912df5800ed2fc65371c5ee784d6a45fb Signed-off-by: Julien Fontaine --- .../proto-definition/proto/CommandExecutor.proto | 4 + .../application/src/main/resources/logback.xml | 3 +- .../executor/ComponentRemotePythonExecutor.kt | 5 + .../core/BluePrintConstants.kt | 4 +- .../core/api/data/BlueprintRemoteProcessorData.kt | 5 + .../rest/service/RestLoggerService.kt | 9 ++ .../execution/RemoteScriptExecutionService.kt | 5 + .../src/main/python/command_executor_handler.py | 53 ++++++----- .../src/main/python/command_executor_server.py | 24 ++--- .../src/main/python/proto/CommandExecutor_pb2.py | 102 +++++++++++++-------- ms/command-executor/src/main/python/server.py | 7 +- ms/command-executor/src/main/python/utils.py | 15 ++- 12 files changed, 156 insertions(+), 80 deletions(-) diff --git a/components/model-catalog/proto-definition/proto/CommandExecutor.proto b/components/model-catalog/proto-definition/proto/CommandExecutor.proto index ac6921965..bad6a01c3 100644 --- a/components/model-catalog/proto-definition/proto/CommandExecutor.proto +++ b/components/model-catalog/proto-definition/proto/CommandExecutor.proto @@ -17,6 +17,8 @@ message ExecutionInput { google.protobuf.Struct properties = 6; // Request Time Stamp google.protobuf.Timestamp timestamp = 7; + string subRequestId = 8; + string originatorId = 9; } message PrepareEnvInput { @@ -28,6 +30,8 @@ message PrepareEnvInput { int32 timeOut = 5; google.protobuf.Struct properties = 6; google.protobuf.Timestamp timestamp = 7; + string subRequestId = 8; + string originatorId = 9; } message Identifiers { diff --git a/ms/blueprintsprocessor/application/src/main/resources/logback.xml b/ms/blueprintsprocessor/application/src/main/resources/logback.xml index aceea4327..b905b7da4 100644 --- a/ms/blueprintsprocessor/application/src/main/resources/logback.xml +++ b/ms/blueprintsprocessor/application/src/main/resources/logback.xml @@ -1,5 +1,6 @@