Skip to content

Commit

Permalink
repartition command: metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
eduwercamacaro committed Feb 14, 2025
1 parent 509fb40 commit f64f85f
Show file tree
Hide file tree
Showing 41 changed files with 3,000 additions and 711 deletions.
1 change: 0 additions & 1 deletion schemas/internal/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import "variable.proto";
import "storage.proto";
import "acls.proto";
import "job.proto";
import "metrics.proto";


// This is the schema of everything that flows through the Central Command topic.
Expand Down
1 change: 1 addition & 0 deletions schemas/internal/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ enum GetableClassEnum {
SCHEDULED_WF_RUN = 17;
METRIC = 18;
PARTITION_METRIC = 19;
METRIC_RUN = 20;
}

message AttributePb {
Expand Down
11 changes: 11 additions & 0 deletions schemas/littlehorse/common_enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,15 @@ enum LHErrorType {

// An unexpected LittleHorse Internal error occurred. This is not expected to happen.
INTERNAL_ERROR = 8;
}

enum MeasurableObject {
WORKFLOW = 0;
TASK = 1;
}

enum MetricType {
COUNT = 0;
AVG = 1;
RATIO = 2;
}
22 changes: 6 additions & 16 deletions schemas/littlehorse/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,6 @@ message Metric {
google.protobuf.Duration window_length = 3;
}

message MetricId {
MeasurableObject measurable = 1;
MetricType type = 2;
}

enum MeasurableObject {
WORKFLOW = 0;
TASK = 1;
}

enum MetricType {
COUNT = 0;
AVG = 1;
RATIO = 2;
}

message PartitionMetric {
PartitionMetricId id = 1;
google.protobuf.Timestamp created_at = 2;
Expand All @@ -49,4 +33,10 @@ message PartitionWindowedMetric {
message PartitionMetricId {
MetricId id = 1;
TenantId tenant_id = 2;
}

message MetricRun {
MetricRunId id = 1;
double value = 2;
google.protobuf.Timestamp created_at = 4;
}
10 changes: 10 additions & 0 deletions schemas/littlehorse/object_id.proto
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,14 @@ message TenantId {
// ID for a ScheduledWfRun
message ScheduledWfRunId {
string id = 1;
}

message MetricId {
MeasurableObject measurable = 1;
MetricType type = 2;
}

message MetricRunId {
MetricId metric_id = 1;
google.protobuf.Timestamp window_start = 2;
}
120 changes: 111 additions & 9 deletions sdk-go/lhproto/common_enums.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f64f85f

Please sign in to comment.