Sidekick
Search…
Conditional Tracepoints
You may need to take snapshots only when certain conditions are met. Use the “Condition” box in the edit popup to specify an optional condition:
Thundra Sidekick - Tracepoint Event Condition
The condition syntax was kept very simple to make it understandable without referring to a manual. Any developer who is already using a mainstream language should feel familiar with the syntax. If you are not sure, you can look at the quick tip by hovering the question mark next to the “Condition” label:
Thundra Sidekick - Tracepoint Event Hint
Basically, the conditions defined should return a boolean value. So, some of the simplest forms consist of a comparison operator and two operands (variable or literal) like below:
1
id != null
2
name == “bob”
3
isRegistered == true
4
itemCount > 0
5
failedCount <= recoveredCount
Copied!
You can combine those expressions with binary boolean operators to build more complex expressions:
1
id != null && isRegistered == true
2
id != null AND isRegistered == true
3
4
itemCount > 0 || failedCount <= recoveredCount
5
itemCount > 0 OR failedCount <= recoveredCount
Copied!
You can use parentheses to force precedence between multiple boolean clauses:
1
(id != null && isRegistered == true) OR (itemCount > 0 || failedCount <= recoveredCount)
Copied!
Another feature is using placeholders to get the primitives in the objects. You can access certain properties that is normally not available as a local variable at the tracepoint location, using the special syntax: {spring.user.name}
Copy link