GenericMatch¶
| Field | Type | Description |
|---|---|---|
| base_matcher | A single predicate to evaluate. (Only one of base_matcher, or or_matcher, and_matcher, not_matcher can be set) |
|
| or_matcher | A list of predicates to be OR-ed together. (Only one of or_matcher, or base_matcher, and_matcher, not_matcher can be set) |
|
| and_matcher | A list of predicates to be AND-ed together. (Only one of and_matcher, or base_matcher, or_matcher, not_matcher can be set) |
|
| not_matcher | An inversion of a predicate. (Only one of not_matcher, or base_matcher, or_matcher, and_matcher can be set) |
Example¶
JSON
{
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
}
GenericMatch.GenericMatchCondition¶
| Field | Type | Description |
|---|---|---|
| log_field | string | Match against a log field. (Only one of log_field, or log_body, log_field_json_path, state_key can be set) |
| log_body | bool | Match against the log body. (Only one of log_body, or log_field, log_field_json_path, state_key can be set) |
| log_field_json_path | string | Match against a JSON path expression inside a log field. (Only one of log_field_json_path, or log_field, log_body, state_key can be set) |
| state_key | A state value specified by the scope and key. (Only one of state_key, or log_field, log_body, log_field_json_path can be set) |
|
| operator | bitdrift.public.unary.explorations.v1.Operator | The operator of the conditional. |
| string_value | string | A string value to match against. (Only one of string_value, or semver_value, int_value, double_value, saved_field_id can be set) |
| semver_value | string | A semantic version value to match against. (Only one of semver_value, or string_value, int_value, double_value, saved_field_id can be set) |
| int_value | int32 | An integer value to match against. (Only one of int_value, or string_value, semver_value, double_value, saved_field_id can be set) |
| double_value | double | A double value to match against. (Only one of double_value, or string_value, semver_value, int_value, saved_field_id can be set) |
| saved_field_id | string | A reference to a value saved from a previous match rule. (Only one of saved_field_id, or string_value, semver_value, int_value, double_value can be set) |
Example¶
JSON
{
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
GenericMatch.GenericMatchCondition.StateKey¶
| Field | Type | Description |
|---|---|---|
| scope | bitdrift.public.unary.explorations.v1.StateScope | The scope of the state key to look up. |
| key | string | The key within the given scope to read the value from. |
Example¶
JSON
{
"key": "example-key",
"scope": "GLOBAL_STATE"
}
GenericMatch.MatcherList¶
A list of two or more matchers. Used to allow using a list within a oneof for and/or matching.
| Field | Type | Description |
|---|---|---|
| matchers | The child matchers to evaluate together. |
Example¶
JSON
{
"matchers": [
{
"base_matcher": {
"log_field": "field_name",
"operator": "EQUAL",
"string_value": "example"
}
}
]
}