open-policy-agent/opa

[Documentation] No documentation for metric definitions

Opened this issue · 5 comments

What is the underlying problem you're trying to solve?

I could not find any proper documentation that lists all metrics emitted by OPA or the envoy plugin today. Although the names are self explanatory, some might need a more thorough explanation.
Few examples of such scenarios from top of my head:

  1. What does http send metric capture if there are multiple send calls in a single query execution?
  2. Is http send metric emitted if there is an inter query cache hit?

Please do let me know if there is any source I might have missed!

Describe the ideal solution

Although deep diving of the code gives a good insight on these questions, a documentation page/table dedicated to metrics and how they are captured will help the user interpret those metrics better.

Describe a "Good Enough" solution

If not a documentation page, a simple README would do.

Additional Context

N/A

We have this section that explains the performance metrics. Feel free to update if you think it needs to be improved.

@ashutosh-narkar I don't see the http.send() builtin metrics here (or any other builtin for that matter), will it be good to have them here?
Also does OPA emit a metric for number of http.send() calls in each policy execution. Today we would have to look into policy code to check this.

If you see any missing ones feel free to update. We keep on adding more metrics and probably the doc hasn't been updated.

Also does OPA emit a metric for number of http.send() calls in each policy execution. Today we would have to look into policy code to check this.

@ashutosh-narkar any comments on this? If this metric doesn't exist yet, I could work on adding this.

Also does OPA emit a metric for number of http.send() calls in each policy execution.

I don't think so. There is a metric around inter-query cache hits. It would be better if you could create a separate issue for that with details about the need for such a metric. Thanks.