When setting up probes, if it's required to be triggered only under specific circumstances. That's where our conditional logic comes into play. You can use the context of active variables to create these conditions. Dive in to explore how you can utilize the depth of our conditionals:
- Numbers: Integer and decimal values.
- Strings: Sequence of characters enclosed within quotes.
- Booleans: True or false values.
!=: Not equals
<: Less than (for numbers)
<=: Less than or equal to (for numbers)
>: Greater than (for numbers)
>=: Greater than or equal to (for numbers)
&&: Logical AND
||: Logical OR
)can be used to group conditions and override the standard priority of operations.
Given the variables:
number = 5
text = "hello"
flag = True
(number == 5 && text == "hello")
(flag || (number == 6 && text != "world"))
((number > 4 || flag) && text != "world")
(number < 5 && text == "hello")
(text == "world" || (number != 5 && !flag))
Given the rule
(number > 4 && (text == "hello" || (flag && text != "world"))), the system checks if
numberis greater than 4. If true, it then checks if the
textis "hello" or both
flagis true and
textis not "world".
We're actively working to support complex data structures like arrays, maps, and objects etc. These will be introduced in the upcoming releases, allowing for even more powerful conditional operations.