Skip to content

Commit

Permalink
add counter spec to sankey diagram actions (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Augustyniak authored Oct 16, 2024
1 parent 54dcf2d commit 982ebb7
Showing 1 changed file with 31 additions and 27 deletions.
58 changes: 31 additions & 27 deletions src/bitdrift_public/protobuf/workflow/v1/workflow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,6 @@ message Workflow {
// The tags for the metric.
repeated Tag tags = 4;

// Wraps a tag that is associated with the metric.
message Tag {
// The name of the tag.
string name = 1 [(validate.rules).string = {min_len: 1}];

oneof tag_type {
option (validate.required) = true;

// A fixed tag value.
string fixed_value = 2 [(validate.rules).string = {min_len: 1}];

// The tag value is extracted from a field in the log. If the field is not present, no tag is added.
FieldExtracted field_extracted = 3;
}
}

// A synthetic counter.
message Counter {
}
Expand Down Expand Up @@ -279,6 +263,26 @@ message Workflow {
// following order: A -> B(1) -> B(2) -> B(3) -> B(4) -> B(5) -> C, the final Sankey diagram will show
// the values extracted from the following nodes sequence: A -> B(3) -> B(4) -> B(5) -> C.
uint32 limit = 2 [(validate.rules).uint32.gt = 0];

// Tags for a counter that is emitted when a Sankey diagram path is completed.
// Each completion of the path increments the counter by one.
repeated Tag tags = 3;
}

// Wraps a tag that is associated with the metric.
message Tag {
// The name of the tag.
string name = 1 [(validate.rules).string = {min_len: 1}];

oneof tag_type {
option (validate.required) = true;

// A fixed tag value.
string fixed_value = 2 [(validate.rules).string = {min_len: 1}];

// The tag value is extracted from a field in the log. If the field is not present, no tag is added.
FieldExtracted field_extracted = 3;
}
}
}

Expand Down Expand Up @@ -310,19 +314,19 @@ message Workflow {
message LimitDuration {
uint64 duration_ms = 2 [(validate.rules).uint64.gt = 0];
}
}

// A value extracted from log's field.
message FieldExtracted {
string field_name = 1 [(validate.rules).string = {min_len: 1}];
// A value extracted from log's field.
message FieldExtracted {
string field_name = 1 [(validate.rules).string = {min_len: 1}];

message Exact {
};
message Exact {
};

// For now we only support exact match, but in the future we might support more complex extraction logic like regex captures.
oneof extraction_type {
option (validate.required) = true;
// For now we only support exact match, but in the future we might support more complex extraction logic like regex captures.
oneof extraction_type {
option (validate.required) = true;

Exact exact = 2;
Exact exact = 2;
}
}
}
}

0 comments on commit 982ebb7

Please sign in to comment.