Skip to content

Commit b945d89

Browse files
committed
workflow debug: add incremental debug statistics stats uploads
Signed-off-by: Matt Klein <mklein@bitdrift.io>
1 parent 9a78ed9 commit b945d89

File tree

1 file changed

+17
-15
lines changed
  • src/bitdrift_public/protobuf/client/v1

1 file changed

+17
-15
lines changed

src/bitdrift_public/protobuf/client/v1/api.proto

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ message StatsUploadRequest {
396396

397397
// A map of metric ID to any cardinality overflows that occurred during this snapshot interval.
398398
map<string, uint64> metric_id_overflows = 3;
399+
400+
// Workflow ID to debug data that occurred during this snapshot interval.
401+
map<string, DebugDataRequest.WorkflowDebugData> workflow_debug_data = 4;
399402
}
400403

401404
// A collection of stats snapshots to be recorded by the backend.
@@ -536,36 +539,35 @@ message SankeyIntentResponse {
536539

537540
// Debug data that is periodically sent when instructed via the DebugControlResponse message.
538541
message DebugDataRequest {
539-
message WorkflowStateDebugData {
540-
// The ID of the state being reported on.
541-
string state_id = 1;
542-
542+
message WorkflowTransitionDebugData {
543543
oneof transition_type {
544544
// The index of the transition that was taken to leave this state.
545-
uint32 transition_index = 2;
545+
uint32 transition_index = 1;
546546

547547
// Whether this transition was a timeout transition.
548-
bool timeout_transition = 3;
548+
bool timeout_transition = 2;
549549
}
550550

551551
// The number of times this state/transition has been transitioned out of.
552-
uint64 transition_count = 4;
552+
uint64 transition_count = 3;
553553

554554
// The last time this state/transition was transitioned out of.
555-
google.protobuf.Timestamp last_transition_time = 5;
555+
google.protobuf.Timestamp last_transition_time = 4;
556556
}
557557

558-
message WorkflowDebugData {
559-
// The ID of the workflow being debugged.
560-
string workflow_id = 1;
558+
message WorkflowStateDebugData {
559+
repeated WorkflowTransitionDebugData transitions = 1;
560+
}
561561

562-
// The state debug data for each state in the workflow that has been transitioned.
563-
repeated WorkflowStateDebugData states = 2;
562+
message WorkflowDebugData {
563+
// The state debug data for each state in the workflow that has been transitioned. This is a map
564+
// of state ID to data.
565+
map<string, WorkflowStateDebugData> states = 1;
564566
}
565567

566568
// If instructed to debug workflows, this will contain the debug data for each workflow being
567-
// debugged.
568-
repeated WorkflowDebugData workflow_debug_data = 1;
569+
// debugged. This is map of workflow ID to data.
570+
map<string, WorkflowDebugData> workflow_debug_data = 1;
569571
}
570572

571573
// A multiplexed response sent over the bitdrift API.

0 commit comments

Comments
 (0)