Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,27 @@ message LogMatcher {
}
}

// Base matcher for evaluating the value of a feature flag.
message FeatureFlagMatch {
string flag_name = 1 [(validate.rules).string = {min_len: 1, max_len: 64}];

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

// Matches against the string value of the feature flag variant. If the variant
// is not set we'll match against the empty string.
StringValueMatch string_value_match = 2;

// Matches if the feature flag is set (regardless of variant).
IsSetMatch is_set_match = 3;
}
}

oneof match_type {
option (validate.required) = true;
MessageMatch message_match = 1;
TagMatch tag_match = 2;
FeatureFlagMatch feature_flag_match = 3;
}
}

Expand Down
16 changes: 16 additions & 0 deletions src/bitdrift_public/protobuf/workflow/v1/workflow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ message Workflow {

// The tag value is the body of the log. If the body is not present, no tag is added.
bool log_body_extracted = 4;

FeatureFlagExtracted feature_flag_extracted = 5;
}
}

Expand Down Expand Up @@ -425,4 +427,18 @@ message Workflow {
Exact exact = 2;
}
}

// A value extracted from the feature flags.
message FeatureFlagExtracted {
string name = 1 [(validate.rules).string = {min_len: 1}];

message Exact {
};

// For now we only support exact match, but in the future we might support more complex
// extraction logic like regex captures. If not specified, the default is exact match.
oneof extraction_type {
Exact exact = 2;
}
}
}
Loading