diff --git a/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto b/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto index 1e05b3d..df8b2a6 100644 --- a/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto +++ b/src/bitdrift_public/protobuf/matcher/v1/log_matcher.proto @@ -55,11 +55,19 @@ message LogMatcher { state.v1.StateValueMatch state_value_match = 3 [(validate.rules).message.required = true]; } + message SampledMatch { + // The % chance that a match will occur. This is the numerator of the percentage, with the + // denominator being 1,000,000. For example, if the value is 10,000, then 1% of matches will + // be sampled. + uint32 sample_rate = 1; + } + oneof match_type { option (validate.required) = true; MessageMatch message_match = 1; TagMatch tag_match = 2; StateMatch state_match = 4; + SampledMatch sampled_match = 5; } reserved 3; diff --git a/src/bitdrift_public/protobuf/workflow/v1/workflow.proto b/src/bitdrift_public/protobuf/workflow/v1/workflow.proto index 3b4f41d..9b12d32 100644 --- a/src/bitdrift_public/protobuf/workflow/v1/workflow.proto +++ b/src/bitdrift_public/protobuf/workflow/v1/workflow.proto @@ -190,8 +190,14 @@ message Workflow { ActionEmitSankeyDiagram action_emit_sankey_diagram = 3; ActionTakeScreenshot action_take_screenshot = 4; ActionGenerateLog action_generate_log = 5; + ActionStartTracing action_start_tracing = 6; } + // Specifies that the current session will start trace sampling. Tracing will stop when the + // workflow run ends. The exception to this is if the run results in a flush. If this happens, + // tracing will stay on until flush streaming completes. + message ActionStartTracing {} + // Generates a new log message. This log will be injected into the workflow engine and processed // like any other log, either by this workflow or by another workflow. message ActionGenerateLog {