tracetest
tracetest copied to clipboard
support expressions in assertions
Problem
Today we only can execute assertions against static values. However, there are some use-cases for more complex assertions, such as asserting that an operation that is async runs in under 2 minutes. Or that your wallet balance is less than it was before the purchase.
Examples
myapp.user.balance < myapp.user.balance_before_purchase
span.endTime < tracetest.execution.startTime + 2m
Design
To make it fast, I think this should not allow using attributes from other spans. So, you can only reference attributes of the span that is being validated at that moment.