Is your feature request related to a problem? Please describe.
OPA allows to print() information from within the policy. This can be helpful to for example output conditions that led to a token being invalid and can cut down debugging times considerably.
Describe the solution you would like
Since we already have support for sending open tracing Spans for the OPA filters, it would be helpful to include the print() output that happened as part of an evaluation in the Span's events via the LogKV method.
Describe alternatives you've considered (optional)
The envoy plugin logs the print output which looses context to the decision made.
Additional context (optional)
This requires an upgrade to OPA v0.70 as the corresponding envoy plugin was changed to allow configuring a print hook. There is a test that demonstrates using such a hook.
Is your feature request related to a problem? Please describe. OPA allows to
print()
information from within the policy. This can be helpful to for example output conditions that led to a token being invalid and can cut down debugging times considerably.Describe the solution you would like Since we already have support for sending open tracing Spans for the OPA filters, it would be helpful to include the
print()
output that happened as part of an evaluation in the Span's events via theLogKV
method.Describe alternatives you've considered (optional) The envoy plugin logs the print output which looses context to the decision made.
Additional context (optional) This requires an upgrade to OPA v0.70 as the corresponding envoy plugin was changed to allow configuring a print hook. There is a test that demonstrates using such a hook.
Would you like to work on it? Yes