Skip to content

Commit

Permalink
Add documentation about decision log req_id attribute
Browse files Browse the repository at this point in the history
The documentation purpose is to explain the relation with
others logs, how it could be used, and when it is included
on decision logs.

Fixes: open-policy-agent#5006

Signed-off-by: Humberto Corrêa da Silva <humbertoc_silva@hotmail.com>
  • Loading branch information
humbertoc-silva committed Oct 13, 2022
1 parent b50a1bf commit 7273146
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/content/management-decision-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Decision log updates contain the following fields:
| `[_].erased` | `array[string]` | Set of JSON Pointers specifying fields in the event that were erased. |
| `[_].masked` | `array[string]` | Set of JSON Pointers specifying fields in the event that were masked. |
| `[_].nd_builtin_cache` | `object` | Key-value pairs of non-deterministic builtin names, paired with objects specifying the input/output mappings for each unique invocation of that builtin during policy evaluation. Intended for use in debugging and decision replay. Receivers will need to decode the JSON using Rego's JSON decoders. |
| `[_].req_id` | `number` | Unique request identifier for the request that started the policy query. The attribute value is the same as the value present in others logs (request, response, and print) and could be used to correlate them all. This attribute will be included just when OPA runtime is initialized in server mode and the log level is equal or greater than info. |

If the decision log was successfully uploaded to the remote service, it should respond with an HTTP 2xx status. If the
service responds with a non-2xx status, OPA will requeue the last chunk containing decision log events and upload it
Expand Down

0 comments on commit 7273146

Please sign in to comment.