From 470098c3dd8e890fbf29a6302a1d6226495a6ec2 Mon Sep 17 00:00:00 2001 From: ef Date: Wed, 24 Feb 2021 13:31:29 +0100 Subject: [PATCH 1/5] Add submission status metrics --- .../adapter/schema/submission_status.proto | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/protobuf/emif/adapter/schema/submission_status.proto b/protobuf/emif/adapter/schema/submission_status.proto index 1cdf314..493d432 100644 --- a/protobuf/emif/adapter/schema/submission_status.proto +++ b/protobuf/emif/adapter/schema/submission_status.proto @@ -19,6 +19,9 @@ message SubmissionStatus { Failed failed = 3; } + // Metrics regarding the submission + google.protobuf.Timestamp metrics = 4; + // Signals that the submission succeeded message Succeeded { // Specifies the time when the payload was sent to Elhub @@ -27,10 +30,27 @@ message SubmissionStatus { // Signals that the submission failed message Failed { + // Specifies the time when the payload failed google.protobuf.Timestamp at = 1; + + // Specifies a reason code of why the submission failed SubmissionFailureReasonCode reasonCode = 2; + + // A message that describes why the submission failed string reasonMessage = 3; - } + } + + // Represents a colleciton of metrics regarding a submission + message Metrics { + // The time when the payload was enqueued + google.protobuf.Timestamp enqueue_time = 1; + + // The time when the payload was read of the queue + google.protobuf.Timestamp dequeue_time = 2; + + // The number of retry attempts in submitting the payload + int32 number_of_retires = 3; + } } enum SubmissionFailureReasonCode { From 6f62cc4f3eec5812fe9f7bfdc78185ca4f1adee3 Mon Sep 17 00:00:00 2001 From: ef Date: Wed, 24 Feb 2021 13:41:03 +0100 Subject: [PATCH 2/5] Rename package --- protobuf/emif/adapter/schema/submission_status.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf/emif/adapter/schema/submission_status.proto b/protobuf/emif/adapter/schema/submission_status.proto index 493d432..a287bfa 100644 --- a/protobuf/emif/adapter/schema/submission_status.proto +++ b/protobuf/emif/adapter/schema/submission_status.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package emif.adapter.schema.submission_status_updates; +package emif.adapter.schema.submission_statuses; import "google/protobuf/timestamp.proto"; /* A message containing one or multiple submission statuses */ From 7508d2f8b151476fde3a7400a81f48076efb9eb1 Mon Sep 17 00:00:00 2001 From: ef Date: Wed, 24 Feb 2021 13:45:18 +0100 Subject: [PATCH 3/5] Fix metrics type --- protobuf/emif/adapter/schema/submission_status.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf/emif/adapter/schema/submission_status.proto b/protobuf/emif/adapter/schema/submission_status.proto index a287bfa..c745150 100644 --- a/protobuf/emif/adapter/schema/submission_status.proto +++ b/protobuf/emif/adapter/schema/submission_status.proto @@ -20,7 +20,7 @@ message SubmissionStatus { } // Metrics regarding the submission - google.protobuf.Timestamp metrics = 4; + Metrics metrics = 4; // Signals that the submission succeeded message Succeeded { From c0b0a782a7e9e2eea369ed30c2de0ed8b4672efe Mon Sep 17 00:00:00 2001 From: ef Date: Wed, 24 Feb 2021 13:49:29 +0100 Subject: [PATCH 4/5] Use snake case --- protobuf/emif/adapter/schema/submission_status.proto | 4 ++-- protobuf/emif/adapter/schema/volumes.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/protobuf/emif/adapter/schema/submission_status.proto b/protobuf/emif/adapter/schema/submission_status.proto index c745150..c49d934 100644 --- a/protobuf/emif/adapter/schema/submission_status.proto +++ b/protobuf/emif/adapter/schema/submission_status.proto @@ -34,10 +34,10 @@ message SubmissionStatus { google.protobuf.Timestamp at = 1; // Specifies a reason code of why the submission failed - SubmissionFailureReasonCode reasonCode = 2; + SubmissionFailureReasonCode reason_code = 2; // A message that describes why the submission failed - string reasonMessage = 3; + string reason_message = 3; } // Represents a colleciton of metrics regarding a submission diff --git a/protobuf/emif/adapter/schema/volumes.proto b/protobuf/emif/adapter/schema/volumes.proto index 14f8806..4903b93 100644 --- a/protobuf/emif/adapter/schema/volumes.proto +++ b/protobuf/emif/adapter/schema/volumes.proto @@ -56,10 +56,10 @@ message Volume { Status status = 2; // The validation code of the volume, or unspecified if the volume is measured - ValidationCode validationCode = 3; + ValidationCode validation_code = 3; // The estimation code of the volume, or unspecified if the volume is measured - EstimationCode estimationCode = 4; + EstimationCode estimation_code = 4; google.protobuf.Timestamp measurement_time = 5; } From 8210e86250679000e57d0ecd7aa5f082524e2c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20F=C3=B8lstad?= <32196030+ef-computas@users.noreply.github.com> Date: Wed, 24 Feb 2021 18:40:56 +0100 Subject: [PATCH 5/5] Fix spelling error --- protobuf/emif/adapter/schema/submission_status.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protobuf/emif/adapter/schema/submission_status.proto b/protobuf/emif/adapter/schema/submission_status.proto index c49d934..3aae082 100644 --- a/protobuf/emif/adapter/schema/submission_status.proto +++ b/protobuf/emif/adapter/schema/submission_status.proto @@ -49,7 +49,7 @@ message SubmissionStatus { google.protobuf.Timestamp dequeue_time = 2; // The number of retry attempts in submitting the payload - int32 number_of_retires = 3; + int32 number_of_retries = 3; } }