You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter data.x = _
| Enter data.x.p
| | Enter data.x.z
| | | Fail 1 = 2
| | Fail data.x.z
| Enter data.x.z
| | Fail 1 = 2
Doesn't include any of the location data to help link the trace events back to the source rego. The raw trace objects already have this data, and you can see it in the json format... but its not something that a person troubleshooting would want to go look at... ex:
What would be ideal is to surface some of the location data in the pretty trace output format.
Proposed change
Prefix the lines with the location information, for example with the trace shown above we could instead have something more like:
<query>:1 Enter data.x = _
x.rego:3 | Enter data.x.p
x.rego:7 | | Enter data.x.z
x.rego:8 | | | Fail 1 = 2
x.rego:4 | | Fail data.x.z
x.rego:7 | Enter data.x.z
x.rego:8 | | Fail 1 = 2
It then makes it super simple to see for each trace event where in the source code it is originating from with the format being filename:line. While we could add the column on too I'm not sure if we need it. This by itself makes it very easy to zero in on where the failure occurred in the source file.
The text was updated successfully, but these errors were encountered:
Expected Behavior
The pretty printed trace output via
--explain <level> --format pretty
for some eval:Doesn't include any of the location data to help link the trace events back to the source rego. The raw trace objects already have this data, and you can see it in the json format... but its not something that a person troubleshooting would want to go look at... ex:
What would be ideal is to surface some of the location data in the pretty trace output format.
Proposed change
Prefix the lines with the location information, for example with the trace shown above we could instead have something more like:
It then makes it super simple to see for each trace event where in the source code it is originating from with the format being
filename:line
. While we could add the column on too I'm not sure if we need it. This by itself makes it very easy to zero in on where the failure occurred in the source file.The text was updated successfully, but these errors were encountered: