Conditional¶
| Field | Type | Description |
|---|---|---|
| conditions | In this dimension, we chain all conditions with ANDs. |
Example¶
JSON
{
"conditions": [
{
"id": "abc-123-def",
"is_custom_lhs": false,
"is_json_path": false,
"lhs": "example",
"lhs_state_scope": "GLOBAL_STATE",
"match_type": "STRING",
"operator": "EQUAL",
"rhs": "example"
}
]
}
Conditional.Condition¶
| Field | Type | Description |
|---|---|---|
| id | string | Conditional unique identifier. It must be unique in the rule it belongs to. |
| lhs | string | Left hand side of the conditional. This is the key of the attribute we want to match against. The kind of attribute depends on the lhs_scope. |
| lhs_state_scope | bitdrift.public.unary.explorations.v1.StateScope | If lhs_scope is not set, lhs is assumed to be a field in the log or the message if the lhs is 'log'. |
| operator | bitdrift.public.unary.explorations.v1.Operator | The operator of the conditional. |
| rhs | string | Right hand side of the conditional. This is the value we want to match against. Depending on the operator this might be a number, a version, a regular expression, etc. |
| match_type | bitdrift.public.unary.explorations.v1.MatchType | The type to which the right hand side (rhs) will be interpreted as. |
| is_custom_lhs | bool | Whether the left hand side (lhs) is a custom field key entered manually by the user. |
| is_json_path | bool | Whether the left hand side (lhs) is a json path string entered manually by the user. |
Example¶
JSON
{
"id": "abc-123-def",
"is_custom_lhs": false,
"is_json_path": false,
"lhs": "example",
"lhs_state_scope": "GLOBAL_STATE",
"match_type": "STRING",
"operator": "EQUAL",
"rhs": "example"
}