Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPA: Enable evaluation trace to spans #3305

Open
mjungsbluth opened this issue Nov 8, 2024 · 0 comments
Open

OPA: Enable evaluation trace to spans #3305

mjungsbluth opened this issue Nov 8, 2024 · 0 comments

Comments

@mjungsbluth
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
When trying to pin point performance issues for specific requests, it would be helpful to get more insights into which rules take how much time.

Describe the solution you would like
OPA allows to configure a query tracer via the rego.EvalQueryTracer() evaluation option. We could introduce a query tracer the adds all events to the Span via LogKV. Since this can create some overhead, this should be hidden behind a command line flag s.t. it can for example only be enabled in test clusters.

Describe alternatives you've considered (optional)
We can replicate the issue locally and run opa eval --profile if we can replicate the whole http request

Additional context (optional)
This requires an upgrade to OPA v0.70 as the corresponding envoy plugin was changed to allow passing evaluation options to the Eval method.

Would you like to work on it?
Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant