Skip to content

Commit

Permalink
Merge pull request #2 from 3lvia/add-metrics
Browse files Browse the repository at this point in the history
Add metrics
  • Loading branch information
erifol authored Mar 5, 2021
2 parents fd0a917 + 59f0777 commit 2ebbbf2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
28 changes: 24 additions & 4 deletions protobuf/emif/adapter/schema/submission_status.proto
Original file line number Diff line number Diff line change
@@ -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 */
Expand All @@ -19,6 +19,9 @@ message SubmissionStatus {
Failed failed = 3;
}

// Metrics regarding the submission
Metrics metrics = 4;

// Signals that the submission succeeded
message Succeeded {
// Specifies the time when the payload was sent to Elhub
Expand All @@ -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;
SubmissionFailureReasonCode reasonCode = 2;
string reasonMessage = 3;
}

// Specifies a reason code of why the submission failed
SubmissionFailureReasonCode reason_code = 2;

// A message that describes why the submission failed
string reason_message = 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_retries = 3;
}
}

enum SubmissionFailureReasonCode {
Expand Down
4 changes: 2 additions & 2 deletions protobuf/emif/adapter/schema/volumes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2ebbbf2

Please sign in to comment.